Class KeyedBroadcastProcessFunction.Context
- java.lang.Object
-
- org.apache.flink.streaming.api.functions.co.BaseBroadcastProcessFunction.Context
-
- org.apache.flink.streaming.api.functions.co.KeyedBroadcastProcessFunction.Context
-
- Enclosing class:
- KeyedBroadcastProcessFunction<KS,IN1,IN2,OUT>
public abstract class KeyedBroadcastProcessFunction.Context extends BaseBroadcastProcessFunction.Context
Acontextavailable to the broadcast side of aBroadcastConnectedStream.Apart from the basic functionality of a
context, this also allows to apply aKeyedStateFunctionto the (local) states of all active keys in the your backend.
-
-
Constructor Summary
Constructors Constructor Description Context()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract <VS,S extends org.apache.flink.api.common.state.State>
voidapplyToKeyedState(org.apache.flink.api.common.state.StateDescriptor<S,VS> stateDescriptor, KeyedStateFunction<KS,S> function)Applies the providedfunctionto the state associated with the providedstate descriptor.abstract longcurrentProcessingTime()Returns the current processing time.abstract longcurrentWatermark()Returns the current event-time watermark.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.-
Methods inherited from class org.apache.flink.streaming.api.functions.co.BaseBroadcastProcessFunction.Context
getBroadcastState
-
-
-
-
Method Detail
-
applyToKeyedState
public abstract <VS,S extends org.apache.flink.api.common.state.State> void applyToKeyedState(org.apache.flink.api.common.state.StateDescriptor<S,VS> stateDescriptor, KeyedStateFunction<KS,S> function) throws ExceptionApplies the providedfunctionto the state associated with the providedstate descriptor.- Parameters:
stateDescriptor- the descriptor of the state to be processed.function- the function to be applied.- Throws:
Exception
-
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.
-
-