Package akka.stream.scaladsl
Class RestartWithBackoffLogic<S extends Shape>
- java.lang.Object
-
- akka.stream.stage.GraphStageLogic
-
- akka.stream.stage.TimerGraphStageLogic
-
- akka.stream.stage.TimerGraphStageLogicWithLogging
-
- akka.stream.scaladsl.RestartWithBackoffLogic<S>
-
- All Implemented Interfaces:
StageLogging
public abstract class RestartWithBackoffLogic<S extends Shape> extends TimerGraphStageLogicWithLogging
Shared logic for all restart with backoff logics.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.stream.stage.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 Summary
Constructors Constructor Description RestartWithBackoffLogic(java.lang.String name, S shape, Attributes inheritedAttributes, RestartSettings settings, boolean onlyOnFailures)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidbackoff()protected <T> GraphStageLogic.SubSinkInlet<T>createSubInlet(Outlet<T> out)protected <T> GraphStageLogic.SubSourceOutlet<T>createSubOutlet(Inlet<T> in)booleanfinishing()voidfinishing_$eq(boolean x$1)protected java.lang.Class<?>logSource()Override to customise reported log sourceprotected booleanmaxRestartsReached()protected voidonTimer(java.lang.Object timerKey)Will be called when the scheduled timer is triggered.voidpreStart()Invoked before any external events are processed, at the startup of the operator.scala.concurrent.duration.DeadlineresetDeadline()voidresetDeadline_$eq(scala.concurrent.duration.Deadline x$1)intrestartCount()voidrestartCount_$eq(int x$1)protected voidscheduleRestartTimer()protected abstract voidstartGraph()-
Methods inherited from class akka.stream.stage.TimerGraphStageLogic
afterPostStop, cancelTimer, isTimerActive, scheduleAtFixedRate, scheduleAtFixedRate, scheduleOnce, scheduleOnce, schedulePeriodically, schedulePeriodically, schedulePeriodicallyWithInitialDelay, schedulePeriodicallyWithInitialDelay, scheduleWithFixedDelay, scheduleWithFixedDelay
-
Methods inherited from class akka.stream.stage.GraphStageLogic
abortEmitting, abortReading, beforePreStart, cancel, cancel, cancelStage, complete, completeStage, conditionalTerminateInput, conditionalTerminateOutput, createAsyncCallback, eagerTerminateInput, eagerTerminateOutput, emit, emit, emit, emitMultiple, emitMultiple, emitMultiple, emitMultiple, emitMultiple, emitMultiple, fail, failStage, getAsyncCallback, getEagerStageActor, getHandler, getHandler, getStageActor, grab, hasBeenPulled, ignoreTerminateInput, ignoreTerminateOutput, inCount, isAvailable, isAvailable, isClosed, isClosed, materializer, outCount, passAlong, passAlong$default$3, passAlong$default$4, passAlong$default$5, postStop, pull, push, read, read, readN, readN, setHandler, setHandler, setHandlers, setKeepGoing, stageActor, stageActorName, subFusingMaterializer, toString, totallyIgnorantInput, tryPull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface akka.stream.stage.StageLogging
_log_$eq, log
-
-
-
-
Constructor Detail
-
RestartWithBackoffLogic
public RestartWithBackoffLogic(java.lang.String name, S shape, Attributes inheritedAttributes, RestartSettings settings, boolean onlyOnFailures)
-
-
Method Detail
-
backoff
protected abstract void backoff()
-
createSubInlet
protected final <T> GraphStageLogic.SubSinkInlet<T> createSubInlet(Outlet<T> out)
- Parameters:
out- The permanent outlet- Returns:
- A sub sink inlet that's sink is attached to the wrapped operator
-
createSubOutlet
protected final <T> GraphStageLogic.SubSourceOutlet<T> createSubOutlet(Inlet<T> in)
- Parameters:
in- The permanent inlet for this operator- Returns:
- Temporary SubSourceOutlet for this "restart"
-
finishing
public boolean finishing()
-
finishing_$eq
public void finishing_$eq(boolean x$1)
-
logSource
protected java.lang.Class<?> logSource()
Description copied from interface:StageLoggingOverride to customise reported log source
-
maxRestartsReached
protected final boolean maxRestartsReached()
-
onTimer
protected void onTimer(java.lang.Object timerKey)
Description copied from class:TimerGraphStageLogicWill be called when the scheduled timer is triggered.- Overrides:
onTimerin classTimerGraphStageLogic- Parameters:
timerKey- key of the scheduled timer
-
preStart
public void preStart()
Description copied from class:GraphStageLogicInvoked before any external events are processed, at the startup of the operator.- Overrides:
preStartin classGraphStageLogic
-
resetDeadline
public scala.concurrent.duration.Deadline resetDeadline()
-
resetDeadline_$eq
public void resetDeadline_$eq(scala.concurrent.duration.Deadline x$1)
-
restartCount
public int restartCount()
-
restartCount_$eq
public void restartCount_$eq(int x$1)
-
scheduleRestartTimer
protected final void scheduleRestartTimer()
-
startGraph
protected abstract void startGraph()
-
-