blob: f43090f0a7f12289d042e9cb2202c8360c8078eb [file] [log] [blame]
package org.onosproject.store.service;
/**
* Interface for serialization for store artifacts.
*/
public interface Serializer {
/**
* Serialize the specified object.
* @param object object to serialize.
* @return serialized bytes.
* @param <T> encoded type
*/
<T> byte[] encode(T object);
/**
* Deserialize the specified bytes.
* @param bytes byte array to deserialize.
* @return deserialized object.
* @param <T> decoded type
*/
<T> T decode(byte[] bytes);
}