java.lang.Object
org.apache.flink.streaming.runtime.streamrecord.StreamElement
Direct Known Subclasses:
LatencyMarker, RecordAttributes, StreamRecord, Watermark, WatermarkStatus

@Internal public abstract class StreamElement extends Object
An element in a data stream. Can be a record, a Watermark, or a RecordAttributes.
  • Constructor Details

    • StreamElement

      public StreamElement()
  • Method Details

    • isWatermark

      public final boolean isWatermark()
      Checks whether this element is a watermark.
      Returns:
      True, if this element is a watermark, false otherwise.
    • isWatermarkStatus

      public final boolean isWatermarkStatus()
      Checks whether this element is a watermark status.
      Returns:
      True, if this element is a watermark status, false otherwise.
    • isRecord

      public final boolean isRecord()
      Checks whether this element is a record.
      Returns:
      True, if this element is a record, false otherwise.
    • isLatencyMarker

      public final boolean isLatencyMarker()
      Checks whether this element is a latency marker.
      Returns:
      True, if this element is a latency marker, false otherwise.
    • isRecordAttributes

      public final boolean isRecordAttributes()
      Check whether this element is record attributes.
      Returns:
      True, if this element is record attributes, false otherwise.
    • asRecord

      public final <E> StreamRecord<E> asRecord()
      Casts this element into a StreamRecord.
      Returns:
      This element as a stream record.
      Throws:
      ClassCastException - Thrown, if this element is actually not a stream record.
    • asWatermark

      public final Watermark asWatermark()
      Casts this element into a Watermark.
      Returns:
      This element as a Watermark.
      Throws:
      ClassCastException - Thrown, if this element is actually not a Watermark.
    • asWatermarkStatus

      public final WatermarkStatus asWatermarkStatus()
      Casts this element into a WatermarkStatus.
      Returns:
      This element as a WatermarkStatus.
      Throws:
      ClassCastException - Thrown, if this element is actually not a Watermark Status.
    • asLatencyMarker

      public final LatencyMarker asLatencyMarker()
      Casts this element into a LatencyMarker.
      Returns:
      This element as a LatencyMarker.
      Throws:
      ClassCastException - Thrown, if this element is actually not a LatencyMarker.
    • asRecordAttributes

      public final RecordAttributes asRecordAttributes()
      Casts this element into a RecordAttributes.
      Returns:
      This element as a RecordAttributes.
      Throws:
      ClassCastException - Thrown, if this element is actually not a RecordAttributes.