public abstract class KeyedBroadcastProcessFunction.Context extends BaseBroadcastProcessFunction.Context
context
available to the broadcast side of a
BroadcastConnectedStream
.
Apart from the basic functionality of a context
, this also allows to apply a KeyedStateFunction
to the (local) states of all
active keys in the your backend.
Constructor and Description |
---|
Context() |
Modifier and Type | Method and Description |
---|---|
abstract <VS,S extends State> |
applyToKeyedState(StateDescriptor<S,VS> stateDescriptor,
KeyedStateFunction<KS,S> function)
Applies the provided
function to the state associated with the provided state descriptor . |
abstract long |
currentProcessingTime()
Returns the current processing time.
|
abstract long |
currentWatermark()
Returns the current event-time watermark.
|
abstract <X> void |
output(OutputTag<X> outputTag,
X value)
Emits a record to the side output identified by the
OutputTag . |
abstract Long |
timestamp()
Timestamp of the element currently being processed or timestamp of a firing timer.
|
getBroadcastState
public abstract <VS,S extends State> void applyToKeyedState(StateDescriptor<S,VS> stateDescriptor, KeyedStateFunction<KS,S> function) throws Exception
function
to the state associated with the provided state descriptor
.stateDescriptor
- the descriptor of the state to be processed.function
- the function to be applied.Exception
public abstract Long timestamp()
This might be null
, for example if the time characteristic of your program is
set to TimeCharacteristic.ProcessingTime
.
public abstract <X> void output(OutputTag<X> outputTag, X value)
OutputTag
.outputTag
- the OutputTag
that identifies the side output to emit to.value
- The record to emit.public abstract long currentProcessingTime()
public abstract long currentWatermark()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.