Class StreamElementSerializer<T>

  • Type Parameters:
    T - The type of value in the StreamRecord
    All Implemented Interfaces:
    Serializable

    @Internal
    public final class StreamElementSerializer<T>
    extends org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>
    Serializer for StreamRecord, Watermark, LatencyMarker, and WatermarkStatus.

    This does not behave like a normal TypeSerializer, instead, this is only used at the stream task/operator level for transmitting StreamRecords and Watermarks.

    See Also:
    Serialized Form
    • Constructor Detail

      • StreamElementSerializer

        public StreamElementSerializer​(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
    • Method Detail

      • getContainedTypeSerializer

        public org.apache.flink.api.common.typeutils.TypeSerializer<T> getContainedTypeSerializer()
      • isImmutableType

        public boolean isImmutableType()
        Specified by:
        isImmutableType in class org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>
      • createInstance

        public StreamRecord<T> createInstance()
        Specified by:
        createInstance in class org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>
      • getLength

        public int getLength()
        Specified by:
        getLength in class org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>
      • copy

        public void copy​(org.apache.flink.core.memory.DataInputView source,
                         org.apache.flink.core.memory.DataOutputView target)
                  throws IOException
        Specified by:
        copy in class org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>
        Throws:
        IOException
      • serialize

        public void serialize​(StreamElement value,
                              org.apache.flink.core.memory.DataOutputView target)
                       throws IOException
        Specified by:
        serialize in class org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>
        Throws:
        IOException
      • deserialize

        public StreamElement deserialize​(org.apache.flink.core.memory.DataInputView source)
                                  throws IOException
        Specified by:
        deserialize in class org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>
        Throws:
        IOException
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in class org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class org.apache.flink.api.common.typeutils.TypeSerializer<StreamElement>