Class TimerReceiverFactory
- java.lang.Object
-
- org.apache.beam.runners.fnexecution.control.TimerReceiverFactory
-
public class TimerReceiverFactory extends java.lang.ObjectA factory that passes timers totimerDataConsumer.The constructed timers uses
len(transformId):transformId:timerIdas the timer id to prevent string collisions. SeeencodeToTimerDataTimerId(java.lang.String, java.lang.String)anddecodeTimerDataTimerId(java.lang.String)for functions to aid with encoding and decoding.If the incoming timer is being cleared, the
TimerInternals.TimerDatasets the fire and hold timestamps toBoundedWindow.TIMESTAMP_MAX_VALUE.
-
-
Constructor Summary
Constructors Constructor Description TimerReceiverFactory(StageBundleFactory stageBundleFactory, java.util.function.BiConsumer<org.apache.beam.sdk.util.construction.Timer<?>,org.apache.beam.runners.core.TimerInternals.TimerData> timerDataConsumer, org.apache.beam.sdk.coders.Coder windowCoder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <K> org.apache.beam.sdk.fn.data.FnDataReceiver<org.apache.beam.sdk.util.construction.Timer<K>>create(java.lang.String transformId, java.lang.String timerFamilyId)static org.apache.beam.sdk.values.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.StringencodeToTimerDataTimerId(java.lang.String transformId, java.lang.String timerFamilyId)Encodes transform and timer family ids into a single string which retains the human readable formatlen(transformId):transformId:timerId.
-
-
-
Constructor Detail
-
TimerReceiverFactory
public TimerReceiverFactory(StageBundleFactory stageBundleFactory, java.util.function.BiConsumer<org.apache.beam.sdk.util.construction.Timer<?>,org.apache.beam.runners.core.TimerInternals.TimerData> timerDataConsumer, org.apache.beam.sdk.coders.Coder windowCoder)
-
-
Method Detail
-
create
public <K> org.apache.beam.sdk.fn.data.FnDataReceiver<org.apache.beam.sdk.util.construction.Timer<K>> create(java.lang.String transformId, java.lang.String timerFamilyId)
-
encodeToTimerDataTimerId
public 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 formatlen(transformId):transformId:timerId. SeedecodeTimerDataTimerId(java.lang.String)for decoding.
-
decodeTimerDataTimerId
public static org.apache.beam.sdk.values.KV<java.lang.String,java.lang.String> decodeTimerDataTimerId(java.lang.String timerDataTimerId)
Decodes a string into the transform and timer family ids. SeeencodeToTimerDataTimerId(java.lang.String, java.lang.String)for encoding.
-
-