Class StreamElement
- 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 Summary
Constructors Constructor Description StreamElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LatencyMarker
asLatencyMarker()
Casts this element into a LatencyMarker.<E> StreamRecord<E>
asRecord()
Casts this element into a StreamRecord.RecordAttributes
asRecordAttributes()
Casts this element into a RecordAttributes.Watermark
asWatermark()
Casts this element into a Watermark.WatermarkStatus
asWatermarkStatus()
Casts this element into a WatermarkStatus.boolean
isLatencyMarker()
Checks whether this element is a latency marker.boolean
isRecord()
Checks whether this element is a record.boolean
isRecordAttributes()
Check whether this element is record attributes.boolean
isWatermark()
Checks whether this element is a watermark.boolean
isWatermarkStatus()
Checks whether this element is a watermark status.
-
-
-
Method Detail
-
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.
-
-