T - The type to serialize@Internal public class KeyedSerializationSchemaWrapper<T> extends Object implements KeyedSerializationSchema<T>
| Constructor and Description |
|---|
KeyedSerializationSchemaWrapper(org.apache.flink.api.common.serialization.SerializationSchema<T> serializationSchema) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.api.common.serialization.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(org.apache.flink.api.common.serialization.SerializationSchema<T> serializationSchema)
public org.apache.flink.api.common.serialization.SerializationSchema<T> getSerializationSchema()
public byte[] serializeKey(T element)
KeyedSerializationSchemaserializeKey in interface KeyedSerializationSchema<T>element - The incoming element to be serializedpublic byte[] serializeValue(T element)
KeyedSerializationSchemaserializeValue in interface KeyedSerializationSchema<T>element - The incoming element to be serializedpublic String getTargetTopic(T element)
KeyedSerializationSchemagetTargetTopic in interface KeyedSerializationSchema<T>element - Incoming element to determine the target topic fromCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.