ApacheAvroSerializerBuilder Class
- java.
lang. Object - com.
azure. core. serializer. avro. apache. ApacheAvroSerializerBuilder
- com.
public class ApacheAvroSerializerBuilder
Fluent builder class that configures and instantiates instances of ApacheAvroSerializer.
Constructor Summary
| Constructor | Description |
|---|---|
| ApacheAvroSerializerBuilder() |
Creates an instance of ApacheAvroSerializerBuilder. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Avro |
build()
Instantiates a new instance of ApacheAvroSerializer based on the configurations set on the builder. |
|
Apache |
decoderFactory(DecoderFactory decoderFactory)
Configures the DecoderFactory that will be used to deserialize the Avro stream into an object. |
|
Apache |
encoderFactory(EncoderFactory encoderFactory)
Configures the EncoderFactory that will be used to serialize an object into an Avro stream. |
|
Apache |
schema(String schema)
Configures the schema that will be associated to the ApacheAvroSerializer when build() is called. |
|
Apache |
specificData(SpecificData specificData)
Configures the SpecificData that will be used during serialization and deserialization of Avro. |
Methods inherited from java.lang.Object
Constructor Details
ApacheAvroSerializerBuilder
public ApacheAvroSerializerBuilder()
Creates an instance of ApacheAvroSerializerBuilder.
Method Details
build
public AvroSerializer build()
Instantiates a new instance of ApacheAvroSerializer based on the configurations set on the builder.
Returns:
decoderFactory
public ApacheAvroSerializerBuilder decoderFactory(DecoderFactory decoderFactory)
Configures the DecoderFactory that will be used to deserialize the Avro stream into an object.
If decoderFactory is null when build() is called DecoderFactory.get() will be used as the decoder factory.
Parameters:
Returns:
encoderFactory
public ApacheAvroSerializerBuilder encoderFactory(EncoderFactory encoderFactory)
Configures the EncoderFactory that will be used to serialize an object into an Avro stream.
If encoderFactory is null when build() is called EncoderFactory.get() will be used as the encoder factory.
Parameters:
Returns:
schema
public ApacheAvroSerializerBuilder schema(String schema)
Configures the schema that will be associated to the ApacheAvroSerializer when build() is called.
Parameters:
Returns:
specificData
public ApacheAvroSerializerBuilder specificData(SpecificData specificData)
Configures the SpecificData that will be used during serialization and deserialization of Avro.
If specificData is null when build() is called SpecificData.get() will be used as the generic data.
Parameters:
Returns: