T - Type to be serialized from and deserialized into. A class that implements this interface is expected to have a constructor with no parameter.public interface Serde<T> extends Closeable
| Modifier and Type | Method and Description |
|---|---|
default void | close()Close this serde class, which will close the underlying serializer and deserializer. |
default void | configure(Map<String,?> configs, boolean isKey)Configure this class, which will configure the underlying serializer and deserializer. |
Deserializer<T> | deserializer() |
Serializer<T> | serializer() |
default void configure(Map<String,?> configs, boolean isKey)
configs - configs in key/value pairsisKey - whether is for key or valuedefault void close()
This method has to be idempotent because it might be called multiple times.
close in interface AutoCloseableclose in interface CloseableSerializer<T> serializer()
Deserializer<T> deserializer()