public class TimerReceiverFactory
extends java.lang.Object
timerDataConsumer
.
The constructed timers uses len(transformId):transformId:timerId
as the timer id to
prevent string collisions. See encodeToTimerDataTimerId(java.lang.String, java.lang.String)
and decodeTimerDataTimerId(java.lang.String)
for functions to aid with encoding and decoding.
If the incoming timer is being cleared, the TimerInternals.TimerData
sets the fire and hold
timestamps to BoundedWindow.TIMESTAMP_MAX_VALUE
.
Constructor and Description |
---|
TimerReceiverFactory(StageBundleFactory stageBundleFactory,
java.util.function.BiConsumer<org.apache.beam.sdk.util.construction.Timer<?>,org.apache.beam.runners.core.TimerInternals.TimerData> timerDataConsumer,
Coder windowCoder) |
Modifier and Type | Method and Description |
---|---|
<K> FnDataReceiver<org.apache.beam.sdk.util.construction.Timer<K>> |
create(java.lang.String transformId,
java.lang.String timerFamilyId) |
static KV<java.lang.String,java.lang.String> |
decodeTimerDataTimerId(java.lang.String timerDataTimerId)
Decodes a string into the transform and timer family ids.
|
static java.lang.String |
encodeToTimerDataTimerId(java.lang.String transformId,
java.lang.String timerFamilyId)
Encodes transform and timer family ids into a single string which retains the human readable
format
len(transformId):transformId:timerId . |
public TimerReceiverFactory(StageBundleFactory stageBundleFactory, java.util.function.BiConsumer<org.apache.beam.sdk.util.construction.Timer<?>,org.apache.beam.runners.core.TimerInternals.TimerData> timerDataConsumer, Coder windowCoder)
public <K> FnDataReceiver<org.apache.beam.sdk.util.construction.Timer<K>> create(java.lang.String transformId, java.lang.String timerFamilyId)
public static java.lang.String encodeToTimerDataTimerId(java.lang.String transformId, java.lang.String timerFamilyId)
len(transformId):transformId:timerId
. See decodeTimerDataTimerId(java.lang.String)
for
decoding.public static KV<java.lang.String,java.lang.String> decodeTimerDataTimerId(java.lang.String timerDataTimerId)
encodeToTimerDataTimerId(java.lang.String, java.lang.String)
for encoding.