|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvoldemort.serialization.VersionedSerializer<T>
T - The Versioned typepublic class VersionedSerializer<T>
A Serializer that removes the Versioned wrapper and delegates to a user-supplied serializer to deal with the remaining bytes
| Constructor Summary | |
|---|---|
VersionedSerializer(Serializer<T> innerSerializer)
|
|
| Method Summary | |
|---|---|
Version |
getVersion(byte[] bytes)
|
byte[] |
toBytes(Versioned<T> versioned)
Construct an array of bytes from the given object |
Versioned<T> |
toObject(byte[] bytes)
Create an object from an array of bytes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VersionedSerializer(Serializer<T> innerSerializer)
| Method Detail |
|---|
public byte[] toBytes(Versioned<T> versioned)
Serializer
toBytes in interface Serializer<Versioned<T>>versioned - The object
public Versioned<T> toObject(byte[] bytes)
Serializer
toObject in interface Serializer<Versioned<T>>bytes - An array of bytes with the objects data
public Version getVersion(byte[] bytes)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||