public class AvroSerializer extends Object implements EventSerializer
| Constructor and Description |
|---|
AvroSerializer(org.apache.avro.Schema writerSchema)
construct an instance with a reader and a writer schema
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
serialize(Object event,
SerializationType serializationType)
serialize a GenericRecord or something compatible (like DemoUserV1 in the tests)
|
void |
tearDown() |
public AvroSerializer(org.apache.avro.Schema writerSchema)
writerSchema - the Avro writer schemapublic byte[] serialize(Object event, SerializationType serializationType) throws IllegalStateException, IOException
serialize in interface EventSerializerevent - the avro recordserializationType - the kind of serialization to use for the eventIllegalStateException - problem with the Avro serialization.IOExceptionpublic void tearDown()
Copyright © 2021. All rights reserved.