Interface ExtendedSerializer<T>
-
- Type Parameters:
T
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,Serializer<T>
- All Known Implementing Classes:
ExtendedSerializer.Wrapper
@Deprecated public interface ExtendedSerializer<T> extends Serializer<T>
Deprecated.This class has been deprecated and will be removed in a future release. Please useSerializer
instead.A Serializer that has access to the headers associated with the record. PreferSerializer
if access to the headers is not required. Once Kafka drops support for Java 7, theserialize()
method introduced by this interface will be added to Serializer with a default implementation so that backwards compatibility is maintained. This interface may be deprecated once that happens. A class that implements this interface is expected to have a constructor with no parameters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ExtendedSerializer.Wrapper<T>
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description byte[]
serialize(java.lang.String topic, Headers headers, T data)
Deprecated.Convertdata
into a byte array.-
Methods inherited from interface org.apache.kafka.common.serialization.Serializer
close, configure, serialize
-
-
-
-
Method Detail
-
serialize
byte[] serialize(java.lang.String topic, Headers headers, T data)
Deprecated.Convertdata
into a byte array.- Specified by:
serialize
in interfaceSerializer<T>
- Parameters:
topic
- topic associated with dataheaders
- headers associated with the recorddata
- typed data- Returns:
- serialized bytes
-
-