Class StreamElement
java.lang.Object
org.apache.flink.streaming.runtime.streamrecord.StreamElement
- Direct Known Subclasses:
LatencyMarker,RecordAttributes,StreamRecord,Watermark,WatermarkStatus
An element in a data stream. Can be a record, a Watermark, or a RecordAttributes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal LatencyMarkerCasts this element into a LatencyMarker.final <E> StreamRecord<E>asRecord()Casts this element into a StreamRecord.final RecordAttributesCasts this element into a RecordAttributes.final WatermarkCasts this element into a Watermark.final WatermarkStatusCasts this element into a WatermarkStatus.final booleanChecks whether this element is a latency marker.final booleanisRecord()Checks whether this element is a record.final booleanCheck whether this element is record attributes.final booleanChecks whether this element is a watermark.final booleanChecks whether this element is a watermark status.
-
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
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
Casts this element into a Watermark.- Returns:
- This element as a Watermark.
- Throws:
ClassCastException- Thrown, if this element is actually not a Watermark.
-
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
Casts this element into a LatencyMarker.- Returns:
- This element as a LatencyMarker.
- Throws:
ClassCastException- Thrown, if this element is actually not a LatencyMarker.
-
asRecordAttributes
Casts this element into a RecordAttributes.- Returns:
- This element as a RecordAttributes.
- Throws:
ClassCastException- Thrown, if this element is actually not a RecordAttributes.
-