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
A base
context available to the broadcasted stream side of a BroadcastConnectedStream.
Apart from the basic functionality of a context, this also allows to
get and update the elements stored in the broadcast state. In other
words, it gives read/write access to the broadcast state.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract longReturns the current processing time.abstract longReturns 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 of the element currently being processed or timestamp of a firing timer.
-
Constructor Details
-
Context
public Context()
-
-
Method Details
-
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
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.
-