Class TimeWindowedSerializer<T>
java.lang.Object
org.apache.kafka.streams.kstream.TimeWindowedSerializer<T>
- All Implemented Interfaces:
Closeable, AutoCloseable, Serializer<Windowed<T>>, org.apache.kafka.streams.kstream.internals.WindowedSerializer<T>
public class TimeWindowedSerializer<T>
extends Object
implements org.apache.kafka.streams.kstream.internals.WindowedSerializer<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault serializer for the inner serializer class of a windowed record. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this serializer.voidConfigure this class.byte[]Convertdatainto a byte array.byte[]Convertdatainto a byte array.byte[]serializeBaseKey(String topic, Headers headers, Windowed<T> data) byte[]serializeBaseKey(String topic, Windowed<T> data)
-
Field Details
-
WINDOWED_INNER_SERIALIZER_CLASS
-
-
Constructor Details
-
TimeWindowedSerializer
public TimeWindowedSerializer() -
TimeWindowedSerializer
-
-
Method Details
-
configure
Description copied from interface:SerializerConfigure this class.- Specified by:
configurein interfaceSerializer<T>- Parameters:
configs- configs in key/value pairsisKey- whether the serializer is used for the key or the value
-
serialize
Description copied from interface:SerializerConvertdatainto a byte array.It is recommended to serialize
nulldata to thenullbyte array.- Specified by:
serializein interfaceSerializer<T>- Parameters:
topic- topic associated with datadata- typed data; may benull- Returns:
- serialized bytes; may be
null
-
serialize
Description copied from interface:SerializerConvertdatainto a byte array.It is recommended to serialize
nulldata to thenullbyte array.Note that the passed in
Headersmay be empty, but nevernull. The implementation is allowed to modify the passed in headers, as a side effect of serialization. It is considered best practice to not delete or modify existing headers, but rather only add new ones.- Specified by:
serializein interfaceSerializer<T>- Parameters:
topic- topic associated with dataheaders- headers associated with the recorddata- typed data; may benull- Returns:
- serialized bytes; may be
null
-
close
public void close()Description copied from interface:SerializerClose this serializer.This method must be idempotent as it may be called multiple times.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSerializer<T>
-
serializeBaseKey
-
serializeBaseKey
-