public class AvroSerializationProvider extends Object implements SerializationProvider, Startable
SerializationProvider.
Parsing code inspired by http://www.infoq.com/articles/ApacheAvro from Boris Lublinsky
Before the actual serialized flux, two bytes are reserved:
majorVersion > current version should be refused.
A minor version increase implies a compatible protocol change.
Messages of a minorVersion > current version are parsed, but new
operation will be ignored or rejected.
If message's major version is < current version, then the
implementation is strongly encouraged to parse and process them.
It is mandatory if only message's code minor version is < current version.
| Modifier and Type | Field and Description |
|---|---|
static byte |
MAJOR_VERSION |
static byte |
MINOR_VERSION |
| Constructor and Description |
|---|
AvroSerializationProvider() |
| Modifier and Type | Method and Description |
|---|---|
Deserializer |
getDeserializer() |
static int |
getMajorVersion() |
static int |
getMinorVersion() |
Serializer |
getSerializer() |
String |
inlineSchemas(String protocolSkeleton) |
org.apache.avro.Protocol |
parseProtocol(String name) |
void |
start(Properties properties,
BuildContext context) |
String |
toString() |
public static byte MAJOR_VERSION
public static byte MINOR_VERSION
public static int getMajorVersion()
public static int getMinorVersion()
public void start(Properties properties, BuildContext context)
public Serializer getSerializer()
getSerializer in interface SerializationProviderpublic Deserializer getDeserializer()
getDeserializer in interface SerializationProviderpublic org.apache.avro.Protocol parseProtocol(String name)
Copyright © 2006–2014 Hibernate. All rights reserved.