public class ListSerializer<Inner> extends Object implements Serializer<List<Inner>>
| Constructor and Description |
|---|
ListSerializer() |
ListSerializer(Serializer<Inner> inner) |
| Modifier and Type | Method and Description |
|---|---|
void | close()Close this serializer. |
void | configure(Map<String,?> configs, boolean isKey)Configure this class. |
Serializer<Inner> | getInnerSerializer() |
byte[] | serialize(String topic, List<Inner> data)Convert data into a byte array. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitserializepublic ListSerializer()
public ListSerializer(Serializer<Inner> inner)
public Serializer<Inner> getInnerSerializer()
public void configure(Map<String,?> configs, boolean isKey)
Serializerconfigure in interface Serializer<List<Inner>>configs - configs in key/value pairsisKey - whether is for key or valuepublic byte[] serialize(String topic, List<Inner> data)
Serializerdata into a byte array.serialize in interface Serializer<List<Inner>>topic - topic associated with datadata - typed datapublic void close()
SerializerThis method must be idempotent as it may be called multiple times.
close in interface Closeableclose in interface AutoCloseableclose in interface Serializer<List<Inner>>