Class JacksonAvroSerializerBuilder
java.lang.Object
com.azure.core.serializer.avro.jackson.JacksonAvroSerializerBuilder
Fluent builder class that configures and instantiates instances of
JacksonAvroSerializer.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavroMapper(com.fasterxml.jackson.dataformat.avro.AvroMapper avroMapper) Configures theAvroMapperthat will be used to serialize objects to Avro streams and deserialize Avro streams to objects.build()Instantiates a new instance ofJacksonAvroSerializerbased on the configurations set on the builder.Configures the schema that will be associated to theJacksonAvroSerializerwhenbuild()is called.
-
Constructor Details
-
JacksonAvroSerializerBuilder
public JacksonAvroSerializerBuilder()
-
-
Method Details
-
build
Instantiates a new instance ofJacksonAvroSerializerbased on the configurations set on the builder.- Returns:
- A new instance of
JacksonAvroSerializer. - Throws:
NullPointerException- Ifschemaisnull.UncheckedIOException- Ifschemacannot be parsed.
-
schema
Configures the schema that will be associated to theJacksonAvroSerializerwhenbuild()is called.- Parameters:
schema- Avro schema to associate to the serializer that is built.- Returns:
- The updated JacksonAvroSerializerBuilder object.
-
avroMapper
public JacksonAvroSerializerBuilder avroMapper(com.fasterxml.jackson.dataformat.avro.AvroMapper avroMapper) Configures theAvroMapperthat will be used to serialize objects to Avro streams and deserialize Avro streams to objects.If
avroMapperisnullAvroMapper()will be used.- Parameters:
avroMapper- TheAvroMapperthat will serialize to and deserialize Avro.- Returns:
- The updated JacksonAvroSerializerBuilder object.
-