public class JacksonAvroSerializerBuilder extends Object
JacksonAvroSerializer
.JacksonAvroSerializer
Constructor and Description |
---|
JacksonAvroSerializerBuilder() |
Modifier and Type | Method and Description |
---|---|
JacksonAvroSerializerBuilder |
avroMapper(com.fasterxml.jackson.dataformat.avro.AvroMapper avroMapper)
Configures the
AvroMapper that will be used to serialize objects to Avro streams and deserialize Avro
streams to objects. |
JacksonAvroSerializer |
build()
Instantiates a new instance of
JacksonAvroSerializer based on the configurations set on the builder. |
JacksonAvroSerializerBuilder |
schema(String schema)
Configures the schema that will be associated to the
JacksonAvroSerializer when JacksonAvroSerializerBuilder.build() is
called. |
public JacksonAvroSerializer build()
JacksonAvroSerializer
based on the configurations set on the builder.JacksonAvroSerializer
.NullPointerException
- If schema
is null
.UncheckedIOException
- If schema
cannot be parsed.public JacksonAvroSerializerBuilder schema(String schema)
JacksonAvroSerializer
when JacksonAvroSerializerBuilder.build()
is
called.schema
- Avro schema to associate to the serializer that is built.public JacksonAvroSerializerBuilder avroMapper(com.fasterxml.jackson.dataformat.avro.AvroMapper avroMapper)
AvroMapper
that will be used to serialize objects to Avro streams and deserialize Avro
streams to objects.
If avroMapper
is null
AvroMapper.AvroMapper()
will be used.
avroMapper
- The AvroMapper
that will serialize to and deserialize Avro.Copyright © 2020 Microsoft Corporation. All rights reserved.