public class AvroSerializationProvider extends Object implements SerializationProvider
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
.
Constructor and Description |
---|
AvroSerializationProvider() |
Modifier and Type | Method and Description |
---|---|
Deserializer |
getDeserializer()
This method will be invoked when any thread needs a Deserializer:
implementors of this Service can return the same instance multiple
times if the Deserializer implementation is threadsafe.
|
static int |
getMajorVersion() |
static int |
getMinorVersion() |
Serializer |
getSerializer()
This method will be invoked when any thread needs a Serializer:
implementors of this Service can return the same instance multiple
times if the Serializer implementation is threadsafe.
|
String |
toString() |
public static int getMajorVersion()
public static int getMinorVersion()
public Serializer getSerializer()
SerializationProvider
getSerializer
in interface SerializationProvider
public Deserializer getDeserializer()
SerializationProvider
getDeserializer
in interface SerializationProvider
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved