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.SchemaRegistryClientclientprotected static intDEFAULT_IDENTITY_MAP_CAPACITYprotected org.apache.avro.message.RawMessageEncoder<T>encoderstatic intID_SIZEstatic byteMAGIC_BYTEprotected Class<T>messageClassstatic StringNAMEprotected org.apache.avro.Schemaschemaprotected intschemaIdprotected StringschemaNameprotected io.confluent.kafka.serializers.KafkaAvroSerializerserializer
-
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 Tdecode(byte[] data)Decodes the byte array returns an object.byte[]encode(T object)Encodes the object returns a byte array representation.StringgetName()Returns the codec namestatic io.confluent.kafka.schemaregistry.client.SchemaRegistryClientgetRegistryClient(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:CodecEncodes the object returns a byte array representation.
-
-