blob: e92cc4bc5a79668dc3ee0ea10bfd82bfab03ba71 [file] [log] [blame]
Yuta HIGUCHIad4c2182014-09-29 11:16:23 -07001package org.onlab.onos.store.serializers;
2
3// TODO: To be replaced with SerializationService from IOLoop activity
4/**
5 * Service to serialize Objects into byte array.
6 */
7public interface KryoSerializationService {
8
9 /**
10 * Serializes the specified object into bytes using one of the
11 * pre-registered serializers.
12 *
13 * @param obj object to be serialized
14 * @return serialized bytes
15 */
16 public byte[] serialize(final Object obj);
17
18 /**
19 * Deserializes the specified bytes into an object using one of the
20 * pre-registered serializers.
21 *
22 * @param bytes bytes to be deserialized
23 * @return deserialized object
24 */
25 public <T> T deserialize(final byte[] bytes);
26
27}