public class InstantSerializer extends java.lang.Object implements Serializer<Instant>
Serializer
for Instant
.
This encodes the number of milliseconds since epoch using LongSerializer
.
Constructor and Description |
---|
InstantSerializer() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(java.util.Map<java.lang.String,?> configs,
boolean isKey) |
byte[] |
serialize(java.lang.String topic,
Instant instant) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
serialize
public void configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
configure
in interface Serializer<Instant>
public byte[] serialize(java.lang.String topic, Instant instant)
serialize
in interface Serializer<Instant>
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface Serializer<Instant>