public abstract class KeyedBroadcastProcessFunction.ReadOnlyContext extends BaseBroadcastProcessFunction.ReadOnlyContext
context
available to the keyed stream side of
a BroadcastConnectedStream
(if any).
Apart from the basic functionality of a context
, this also allows to get a read-only Iterable
over the elements
stored in the broadcast state and a TimerService
for querying time and registering
timers.
Constructor and Description |
---|
ReadOnlyContext() |
Modifier and Type | Method and 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(OutputTag<X> outputTag,
X value)
Emits a record to the side output identified by the
OutputTag . |
abstract TimerService |
timerService()
A
TimerService for querying time and registering timers. |
abstract Long |
timestamp()
Timestamp of the element currently being processed or timestamp of a firing timer.
|
getBroadcastState
public abstract TimerService timerService()
TimerService
for querying time and registering timers.public abstract KS getCurrentKey()
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.