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
param: out The permanent outlet
-
-
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, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor, boolean onlyOnFailures, int maxRestarts)
-
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 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, scheduleOnce, scheduleOnce, schedulePeriodically, schedulePeriodically, schedulePeriodicallyWithInitialDelay, schedulePeriodicallyWithInitialDelay
-
Methods inherited from class akka.stream.stage.GraphStageLogic
abortEmitting, abortReading, attributes, attributes_$eq, beforePreStart, 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, handlers, hasBeenPulled, ignoreTerminateInput, ignoreTerminateOutput, inCount, inHandler, interpreter, interpreter_$eq, isAvailable, isAvailable, isClosed, isClosed, materializer, NoPromise, onFeedbackDispatched, originalStage, originalStage_$eq, outCount, outHandler, passAlong, passAlong$default$3, passAlong$default$4, passAlong$default$5, portToConn, postStop, pull, push, read, read, readN, readN, setHandler, setHandler, setHandlers, setKeepGoing, stageActor, stageActorName, stageId, stageId_$eq, subFusingMaterializer, totallyIgnorantInput, tryPull
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.stream.stage.StageLogging
_log_$eq, log, logSource
-
-
-
-
Constructor Detail
-
RestartWithBackoffLogic
public RestartWithBackoffLogic(java.lang.String name, S shape, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, double randomFactor, boolean onlyOnFailures, int maxRestarts)
-
-
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)
-
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()
-
-