public interface StoreSerializer
extends org.onosproject.store.service.Serializer
| Modifier and Type | Method and Description |
|---|---|
<T> T |
copy(T object)
Returns a copy of the specfied object.
|
<T> T |
decode(byte[] bytes)
Deserializes the specified bytes into an object.
|
<T> T |
decode(java.nio.ByteBuffer buffer)
Deserializes the specified bytes into an object.
|
<T> T |
decode(java.io.InputStream stream)
Deserializes the specified bytes into an object.
|
byte[] |
encode(java.lang.Object obj)
Serializes the specified object into bytes.
|
void |
encode(java.lang.Object obj,
java.nio.ByteBuffer buffer)
Serializes the specified object into bytes.
|
void |
encode(java.lang.Object obj,
java.io.OutputStream stream)
Serializes the specified object into bytes.
|
static StoreSerializer |
using(org.onlab.util.KryoNamespace ns)
Creates a new StoreSerializer instance from a KryoNamespace.
|
byte[] encode(java.lang.Object obj)
encode in interface org.onosproject.store.service.Serializerobj - object to be serializedvoid encode(java.lang.Object obj,
java.nio.ByteBuffer buffer)
obj - object to be serializedbuffer - to write serialized bytesvoid encode(java.lang.Object obj,
java.io.OutputStream stream)
obj - object to be serializedstream - to write serialized bytes<T> T decode(byte[] bytes)
decode in interface org.onosproject.store.service.SerializerT - decoded typebytes - bytes to be deserialized<T> T decode(java.nio.ByteBuffer buffer)
T - decoded typebuffer - bytes to be deserialized<T> T decode(java.io.InputStream stream)
T - decoded typestream - stream containing the bytes to be deserialized<T> T copy(T object)
T - object typeobject - object to copystatic StoreSerializer using(org.onlab.util.KryoNamespace ns)
using in interface org.onosproject.store.service.Serializerns - kryo namespace