Class KeyedBroadcastProcessFunction.ReadOnlyContext
java.lang.Object
org.apache.flink.streaming.api.functions.co.BaseBroadcastProcessFunction.ReadOnlyContext
org.apache.flink.streaming.api.functions.co.KeyedBroadcastProcessFunction.ReadOnlyContext
- Direct Known Subclasses:
KeyedBroadcastProcessFunction.OnTimerContext
- Enclosing class:
- KeyedBroadcastProcessFunction<KS,
IN1, IN2, OUT>
public abstract class KeyedBroadcastProcessFunction.ReadOnlyContext
extends BaseBroadcastProcessFunction.ReadOnlyContext
A
context available to the keyed stream side of
a BroadcastConnectedStream (if any).
Apart from the basic functionality of a context, this also allows to get a read-only Iterable over the elements
stored in the broadcast state and a TimerService for querying time and registering
timers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract longReturns the current processing time.abstract longReturns the current event-time watermark.abstract KSGet key of the element being processed.abstract <X> voidoutput(org.apache.flink.util.OutputTag<X> outputTag, X value) Emits a record to the side output identified by theOutputTag.abstract TimerServiceATimerServicefor querying time and registering timers.abstract LongTimestamp of the element currently being processed or timestamp of a firing timer.Methods inherited from class org.apache.flink.streaming.api.functions.co.BaseBroadcastProcessFunction.ReadOnlyContext
getBroadcastState
-
Constructor Details
-
ReadOnlyContext
public ReadOnlyContext()
-
-
Method Details
-
timerService
ATimerServicefor querying time and registering timers. -
getCurrentKey
Get key of the element being processed. -
timestamp
Timestamp of the element currently being processed or timestamp of a firing timer.This might be
null, depending on the stream's watermark strategy. -
output
public abstract <X> void output(org.apache.flink.util.OutputTag<X> outputTag, X value) Emits a record to the side output identified by theOutputTag.- Parameters:
outputTag- theOutputTagthat identifies the side output to emit to.value- The record to emit.
-
currentProcessingTime
public abstract long currentProcessingTime()Returns the current processing time. -
currentWatermark
public abstract long currentWatermark()Returns the current event-time watermark.
-