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
Acontext
available to the keyed stream side of aBroadcastConnectedStream
(if any).Apart from the basic functionality of a
context
, this also allows to get a read-onlyIterable
over the elements stored in the broadcast state and aTimerService
for querying time and registering timers.
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract long
currentProcessingTime()
Returns the current processing time.abstract long
currentWatermark()
Returns the current event-time watermark.abstract KS
getCurrentKey()
Get key of the element being processed.abstract <X> void
output(org.apache.flink.util.OutputTag<X> outputTag, X value)
Emits a record to the side output identified by theOutputTag
.abstract TimerService
timerService()
ATimerService
for querying time and registering timers.abstract Long
timestamp()
Timestamp 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
-
-
-
-
Method Detail
-
timerService
public abstract TimerService timerService()
ATimerService
for querying time and registering timers.
-
getCurrentKey
public abstract KS getCurrentKey()
Get key of the element being processed.
-
timestamp
public abstract Long 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
- theOutputTag
that 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.
-
-