Interface KinesisSerializationSchema<T>
-
- Type Parameters:
T-
- All Superinterfaces:
Serializable
@PublicEvolving public interface KinesisSerializationSchema<T> extends Serializable
Kinesis-specific serialization schema, allowing users to specify a target stream based on a record's contents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringgetTargetStream(T element)Optional method to determine the target stream based on the element.default voidopen(org.apache.flink.api.common.serialization.SerializationSchema.InitializationContext context)Initialization method for the schema.ByteBufferserialize(T element)Serialize the given element into a ByteBuffer.
-
-
-
Method Detail
-
open
default void open(org.apache.flink.api.common.serialization.SerializationSchema.InitializationContext context) throws ExceptionInitialization method for the schema. It is called before the actual working methodsserialize(Object)and thus suitable for one time setup work.The provided
SerializationSchema.InitializationContextcan be used to access additional features such as e.g. registering user metrics.- Parameters:
context- Contextual information that can be used during initialization.- Throws:
Exception
-
serialize
ByteBuffer serialize(T element)
Serialize the given element into a ByteBuffer.- Parameters:
element- The element to serialize- Returns:
- Serialized representation of the element
-
-