Package org.nuxeo.lib.stream.codec
Class AvroConfluentCodec<T>
- java.lang.Object
-
- org.nuxeo.lib.stream.codec.AvroConfluentCodec<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
client
protected static int
DEFAULT_IDENTITY_MAP_CAPACITY
protected org.apache.avro.message.RawMessageEncoder<T>
encoder
static int
ID_SIZE
static byte
MAGIC_BYTE
protected Class<T>
messageClass
static String
NAME
protected org.apache.avro.Schema
schema
protected int
schemaId
protected String
schemaName
protected io.confluent.kafka.serializers.KafkaAvroSerializer
serializer
-
Constructor Summary
Constructors Constructor Description AvroConfluentCodec(Class<T> messageClass, String schemaRegistryUrls)
Create an AvroConfluent codec
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
decode(byte[] data)
Decodes the byte array returns an object.byte[]
encode(T object)
Encodes the object returns a byte array representation.String
getName()
Returns the codec namestatic io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
getRegistryClient(String schemaRegistryUrls)
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
MAGIC_BYTE
public static final byte MAGIC_BYTE
- See Also:
- Constant Field Values
-
ID_SIZE
public static final int ID_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_IDENTITY_MAP_CAPACITY
protected static final int DEFAULT_IDENTITY_MAP_CAPACITY
- See Also:
- Constant Field Values
-
schema
protected final org.apache.avro.Schema schema
-
schemaId
protected final int schemaId
-
schemaName
protected final String schemaName
-
serializer
protected final io.confluent.kafka.serializers.KafkaAvroSerializer serializer
-
encoder
protected final org.apache.avro.message.RawMessageEncoder<T> encoder
-
client
protected final io.confluent.kafka.schemaregistry.client.SchemaRegistryClient client
-
-
Method Detail
-
getRegistryClient
public static io.confluent.kafka.schemaregistry.client.SchemaRegistryClient getRegistryClient(String schemaRegistryUrls)
-
encode
public byte[] encode(T object)
Description copied from interface:Codec
Encodes the object returns a byte array representation.
-
-