Class KeyedSerializationSchemaWrapper<T>

java.lang.Object
org.apache.flink.streaming.connectors.kafka.internals.KeyedSerializationSchemaWrapper<T>
Type Parameters:
T - The type to serialize
All Implemented Interfaces:
Serializable, KeyedSerializationSchema<T>

@Internal @Deprecated public class KeyedSerializationSchemaWrapper<T> extends Object implements KeyedSerializationSchema<T>
Deprecated.
A simple wrapper for using the SerializationSchema with the KeyedSerializationSchema interface.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyedSerializationSchemaWrapper(org.apache.flink.api.common.serialization.SerializationSchema<T> serializationSchema)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.api.common.serialization.SerializationSchema<T>
    Deprecated.
     
    getTargetTopic(T element)
    Deprecated.
    Optional method to determine the target topic for the element.
    byte[]
    serializeKey(T element)
    Deprecated.
    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)
    Deprecated.
    Serializes the value of the incoming element to a byte array.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KeyedSerializationSchemaWrapper

      public KeyedSerializationSchemaWrapper(org.apache.flink.api.common.serialization.SerializationSchema<T> serializationSchema)
      Deprecated.
  • Method Details

    • getSerializationSchema

      public org.apache.flink.api.common.serialization.SerializationSchema<T> getSerializationSchema()
      Deprecated.
    • serializeKey

      public byte[] serializeKey(T element)
      Deprecated.
      Description copied from interface: KeyedSerializationSchema
      Serializes the key of the incoming element to a byte array This method might return null if no key is available.
      Specified by:
      serializeKey in interface KeyedSerializationSchema<T>
      Parameters:
      element - The incoming element to be serialized
      Returns:
      the key of the element as a byte array
    • serializeValue

      public byte[] serializeValue(T element)
      Deprecated.
      Description copied from interface: KeyedSerializationSchema
      Serializes the value of the incoming element to a byte array.
      Specified by:
      serializeValue in interface KeyedSerializationSchema<T>
      Parameters:
      element - The incoming element to be serialized
      Returns:
      the value of the element as a byte array
    • getTargetTopic

      public String getTargetTopic(T element)
      Deprecated.
      Description copied from interface: KeyedSerializationSchema
      Optional method to determine the target topic for the element.
      Specified by:
      getTargetTopic in interface KeyedSerializationSchema<T>
      Parameters:
      element - Incoming element to determine the target topic from
      Returns:
      null or the target topic