public abstract class TimerGraphStageLogic extends GraphStageLogic
GraphStageLogic.ConditionalTerminateInput, GraphStageLogic.ConditionalTerminateOutput, GraphStageLogic.EagerTerminateInput$, GraphStageLogic.EagerTerminateOutput$, GraphStageLogic.IgnoreTerminateInput$, GraphStageLogic.IgnoreTerminateOutput$, GraphStageLogic.StageActor, GraphStageLogic.StageActorRef$, GraphStageLogic.StageActorRefNotInitializedException, GraphStageLogic.StageActorRefNotInitializedException$, GraphStageLogic.SubSinkInlet<T>, GraphStageLogic.SubSourceOutlet<T>, GraphStageLogic.TotallyIgnorantInput$
Constructor and Description |
---|
TimerGraphStageLogic(Shape _shape) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterPostStop()
INTERNAL API
|
protected void |
cancelTimer(java.lang.Object timerKey)
Cancel timer, ensuring that the
onTimer(java.lang.Object) is not subsequently called. |
protected boolean |
isTimerActive(java.lang.Object timerKey)
Inquire whether the timer is still active.
|
protected void |
onTimer(java.lang.Object timerKey)
Will be called when the scheduled timer is triggered.
|
protected void |
scheduleOnce(java.lang.Object timerKey,
scala.concurrent.duration.FiniteDuration delay)
Schedule timer to call
onTimer(java.lang.Object) after given delay. |
protected void |
schedulePeriodically(java.lang.Object timerKey,
scala.concurrent.duration.FiniteDuration interval)
Schedule timer to call
onTimer(java.lang.Object) periodically with the given interval. |
protected void |
schedulePeriodicallyWithInitialDelay(java.lang.Object timerKey,
scala.concurrent.duration.FiniteDuration initialDelay,
scala.concurrent.duration.FiniteDuration interval)
Schedule timer to call
onTimer(java.lang.Object) periodically with the given interval after the specified
initial delay. |
abortEmitting, abortReading, beforePreStart, cancel, complete, completeStage, conditionalTerminateInput, conditionalTerminateOutput, createAsyncCallback, eagerTerminateInput, eagerTerminateOutput, emit, emit, emit, emitMultiple, emitMultiple, emitMultiple, emitMultiple, emitMultiple, emitMultiple, fail, failStage, getAsyncCallback, getHandler, getHandler, getStageActor, grab, handlers, hasBeenPulled, ignoreTerminateInput, ignoreTerminateOutput, inCount, interpreter, isAvailable, isAvailable, isClosed, isClosed, materializer, outCount, passAlong, portToConn, postStop, preStart, pull, push, read, read, readN, readN, setHandler, setHandler, setHandlers, setKeepGoing, stageActor, stageId, subFusingMaterializer, totallyIgnorantInput, tryPull
public TimerGraphStageLogic(Shape _shape)
protected void onTimer(java.lang.Object timerKey) throws java.lang.Exception
timerKey
- key of the scheduled timerjava.lang.Exception
protected void afterPostStop()
GraphStageLogic
afterPostStop
in class GraphStageLogic
protected final void schedulePeriodicallyWithInitialDelay(java.lang.Object timerKey, scala.concurrent.duration.FiniteDuration initialDelay, scala.concurrent.duration.FiniteDuration interval)
onTimer(java.lang.Object)
periodically with the given interval after the specified
initial delay.
Any existing timer with the same key will automatically be canceled before
adding the new timer.timerKey
- (undocumented)initialDelay
- (undocumented)interval
- (undocumented)protected final void scheduleOnce(java.lang.Object timerKey, scala.concurrent.duration.FiniteDuration delay)
onTimer(java.lang.Object)
after given delay.
Any existing timer with the same key will automatically be canceled before
adding the new timer.timerKey
- (undocumented)delay
- (undocumented)protected final void cancelTimer(java.lang.Object timerKey)
onTimer(java.lang.Object)
is not subsequently called.
timerKey
- key of the timer to cancelprotected final boolean isTimerActive(java.lang.Object timerKey)
timerKey
- (undocumented)protected final void schedulePeriodically(java.lang.Object timerKey, scala.concurrent.duration.FiniteDuration interval)
onTimer(java.lang.Object)
periodically with the given interval.
Any existing timer with the same key will automatically be canceled before
adding the new timer.timerKey
- (undocumented)interval
- (undocumented)