Interface AvroSerializer
- All Superinterfaces:
ObjectSerializer
Generic interface covering basic Avro serialization and deserialization methods.
-
Method Summary
Modifier and TypeMethodDescription<T> Tdeserialize(InputStream stream, TypeReference<T> typeReference) Reads an Avro stream into its object representation.<T> Mono<T>deserializeAsync(InputStream stream, TypeReference<T> typeReference) Reads an Avro stream into its object representation.default <T> TdeserializeFromBytes(byte[] data, TypeReference<T> typeReference) Reads an Avro byte array into its object representation.default <T> Mono<T>deserializeFromBytesAsync(byte[] data, TypeReference<T> typeReference) Reads an Avro byte array into its object representation.voidserialize(OutputStream stream, Object value) Writes an object's Avro representation into a stream.serializeAsync(OutputStream stream, Object value) Writes an object's Avro representation into a stream.default byte[]serializeToBytes(Object value) Converts the object into an Avro byte array.default Mono<byte[]>serializeToBytesAsync(Object value) Converts the object into a Avro byte array.
-
Method Details
-
deserializeFromBytes
Reads an Avro byte array into its object representation.- Specified by:
deserializeFromBytesin interfaceObjectSerializer- Type Parameters:
T- Type of the object.- Parameters:
data- Avro byte array.typeReference-TypeReferencerepresenting the object.- Returns:
- The object represented by the deserialized Avro byte array.
-
deserialize
Reads an Avro stream into its object representation.- Specified by:
deserializein interfaceObjectSerializer- Type Parameters:
T- Type of the object.- Parameters:
stream- Avro stream.typeReference-TypeReferencerepresenting the object.- Returns:
- The object represented by the deserialized Avro stream.
-
deserializeFromBytesAsync
Reads an Avro byte array into its object representation.- Specified by:
deserializeFromBytesAsyncin interfaceObjectSerializer- Type Parameters:
T- Type of the object.- Parameters:
data- Avro byte array.typeReference-TypeReferencerepresenting the object.- Returns:
- Reactive stream that emits the object represented by the deserialized Avro byte array.
-
deserializeAsync
Reads an Avro stream into its object representation.- Specified by:
deserializeAsyncin interfaceObjectSerializer- Type Parameters:
T- Type of the object.- Parameters:
stream- Avro stream.typeReference-TypeReferencerepresenting the object.- Returns:
- Reactive stream that emits the object represented by the deserialized Avro stream.
-
serializeToBytes
Converts the object into an Avro byte array.- Specified by:
serializeToBytesin interfaceObjectSerializer- Parameters:
value- The object.- Returns:
- The Avro binary representation of the serialized object.
-
serialize
Writes an object's Avro representation into a stream.- Specified by:
serializein interfaceObjectSerializer- Parameters:
stream-OutputStreamwhere the object's Avro representation will be written.value- The object.
-
serializeToBytesAsync
Converts the object into a Avro byte array.- Specified by:
serializeToBytesAsyncin interfaceObjectSerializer- Parameters:
value- The object.- Returns:
- Reactive stream that emits the Avro binary representation of the serialized object.
-
serializeAsync
Writes an object's Avro representation into a stream.- Specified by:
serializeAsyncin interfaceObjectSerializer- Parameters:
stream-OutputStreamwhere the object's Avro representation will be written.value- The object.- Returns:
- Reactive stream that will indicate operation completion.
-