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
-
Method Summary
Modifier and TypeMethodDescriptionavroMapper
(com.fasterxml.jackson.dataformat.avro.AvroMapper avroMapper) Configures theAvroMapper
that will be used to serialize objects to Avro streams and deserialize Avro streams to objects.build()
Instantiates a new instance ofJacksonAvroSerializer
based on the configurations set on the builder.Configures the schema that will be associated to theJacksonAvroSerializer
whenbuild()
is called.
-
Constructor Details
-
JacksonAvroSerializerBuilder
public JacksonAvroSerializerBuilder()
-
-
Method Details
-
build
Instantiates a new instance ofJacksonAvroSerializer
based on the configurations set on the builder.- Returns:
- A new instance of
JacksonAvroSerializer
. - Throws:
NullPointerException
- Ifschema
isnull
.UncheckedIOException
- Ifschema
cannot be parsed.
-
schema
Configures the schema that will be associated to theJacksonAvroSerializer
whenbuild()
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 theAvroMapper
that will be used to serialize objects to Avro streams and deserialize Avro streams to objects.If
avroMapper
isnull
AvroMapper()
will be used.- Parameters:
avroMapper
- TheAvroMapper
that will serialize to and deserialize Avro.- Returns:
- The updated JacksonAvroSerializerBuilder object.
-