T
- The type to serialize@Internal public class KeyedSerializationSchemaWrapper<T> extends Object implements KeyedSerializationSchema<T>
Constructor and Description |
---|
KeyedSerializationSchemaWrapper(SerializationSchema<T> serializationSchema) |
Modifier and Type | Method and Description |
---|---|
SerializationSchema<T> |
getSerializationSchema() |
String |
getTargetTopic(T element)
Optional method to determine the target topic for the element.
|
byte[] |
serializeKey(T element)
Serializes the key of the incoming element to a byte array This method might return null if
no key is available.
|
byte[] |
serializeValue(T element)
Serializes the value of the incoming element to a byte array.
|
public KeyedSerializationSchemaWrapper(SerializationSchema<T> serializationSchema)
public SerializationSchema<T> getSerializationSchema()
public byte[] serializeKey(T element)
KeyedSerializationSchema
serializeKey
in interface KeyedSerializationSchema<T>
element
- The incoming element to be serializedpublic byte[] serializeValue(T element)
KeyedSerializationSchema
serializeValue
in interface KeyedSerializationSchema<T>
element
- The incoming element to be serializedpublic String getTargetTopic(T element)
KeyedSerializationSchema
getTargetTopic
in interface KeyedSerializationSchema<T>
element
- Incoming element to determine the target topic fromCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.