Class BaseBroadcastProcessFunction.Context
- java.lang.Object
-
- org.apache.flink.streaming.api.functions.co.BaseBroadcastProcessFunction.Context
-
- Direct Known Subclasses:
BroadcastProcessFunction.Context,KeyedBroadcastProcessFunction.Context
- Enclosing class:
- BaseBroadcastProcessFunction
public abstract class BaseBroadcastProcessFunction.Context extends Object
A basecontextavailable to the broadcasted stream side of aBroadcastConnectedStream.Apart from the basic functionality of a
context, this also allows to get and update the elements stored in thebroadcast state. In other words, it gives read/write access to the broadcast state.
-
-
Constructor Summary
Constructors Constructor Description Context()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract longcurrentProcessingTime()Returns the current processing time.abstract longcurrentWatermark()Returns the current event-time watermark.abstract <K,V>
org.apache.flink.api.common.state.BroadcastState<K,V>getBroadcastState(org.apache.flink.api.common.state.MapStateDescriptor<K,V> stateDescriptor)Fetches theBroadcastStatewith the specified name.abstract <X> voidoutput(org.apache.flink.util.OutputTag<X> outputTag, X value)Emits a record to the side output identified by theOutputTag.abstract Longtimestamp()Timestamp of the element currently being processed or timestamp of a firing timer.
-
-
-
Method Detail
-
getBroadcastState
public abstract <K,V> org.apache.flink.api.common.state.BroadcastState<K,V> getBroadcastState(org.apache.flink.api.common.state.MapStateDescriptor<K,V> stateDescriptor)
Fetches theBroadcastStatewith the specified name.- Parameters:
stateDescriptor- theMapStateDescriptorof the state to be fetched.- Returns:
- The required
broadcast state.
-
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- 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.
-
-