private void setTimer(WindowedValue timerElement, TimerInternals.TimerData timerData) { try { currentTimerKey = keySelector.getKey(timerElement); timerInternals.setTimer(timerData); } catch (Exception e) { throw new RuntimeException("Couldn't set timer", e); } finally { currentTimerKey = null; } }
@Override public void setForWindow(BoundedWindow window) { Instant gcTime = LateDataUtils.garbageCollectionTime(window, windowingStrategy); // make sure this fires after any window.maxTimestamp() timers gcTime = gcTime.plus(GC_DELAY_MS); timerInternals.setTimer( StateNamespaces.window(windowCoder, window), GC_TIMER_ID, gcTime, TimeDomain.EVENT_TIME); }
.setTimer( StateNamespaces.window(new GlobalWindows().windowCoder(), GlobalWindow.INSTANCE), DoFnWithTimers.TIMER_ID,
holdState.add(futureOutputWatermark); timerInternals.setTimer( TimerInternals.TimerData.of(stateNamespace, wakeupTime, TimeDomain.PROCESSING_TIME));