|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.serialization.avro.versioned.AvroVersionedGenericSerializer
public class AvroVersionedGenericSerializer
Avro serializer that uses the generic representation for Avro data. This representation is best for applications which deal with dynamic data, whose schemas are not known until runtime. This serializer supports schema versioning
Constructor Summary | |
---|---|
AvroVersionedGenericSerializer(java.util.Map<java.lang.Integer,java.lang.String> typeDefVersions)
|
|
AvroVersionedGenericSerializer(java.lang.String schema)
Constructor accepting the schema definition as a JSON string. |
Method Summary | |
---|---|
byte[] |
toBytes(java.lang.Object object)
Construct an array of bytes from the given object |
java.lang.Object |
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 AvroVersionedGenericSerializer(java.lang.String schema)
schema
- a serialized JSON object representing a Avro schema.public AvroVersionedGenericSerializer(java.util.Map<java.lang.Integer,java.lang.String> typeDefVersions)
Method Detail |
---|
public byte[] toBytes(java.lang.Object object)
Serializer
toBytes
in interface Serializer<java.lang.Object>
object
- The object
public java.lang.Object toObject(byte[] bytes)
Serializer
toObject
in interface Serializer<java.lang.Object>
bytes
- An array of bytes with the objects data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |