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 void
backoff()
protected <T> GraphStageLogic.SubSinkInlet<T>
createSubInlet(Outlet<T> out)
protected <T> GraphStageLogic.SubSourceOutlet<T>
createSubOutlet(Inlet<T> in)
boolean
finishing()
void
finishing_$eq(boolean x$1)
protected java.lang.Class<?>
logSource()
Override to customise reported log sourceprotected boolean
maxRestartsReached()
protected void
onTimer(java.lang.Object timerKey)
Will be called when the scheduled timer is triggered.void
preStart()
Invoked before any external events are processed, at the startup of the operator.scala.concurrent.duration.Deadline
resetDeadline()
void
resetDeadline_$eq(scala.concurrent.duration.Deadline x$1)
int
restartCount()
void
restartCount_$eq(int x$1)
protected void
scheduleRestartTimer()
protected abstract void
startGraph()
-
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:StageLogging
Override to customise reported log source
-
maxRestartsReached
protected final boolean maxRestartsReached()
-
onTimer
protected void onTimer(java.lang.Object timerKey)
Description copied from class:TimerGraphStageLogic
Will be called when the scheduled timer is triggered.- Overrides:
onTimer
in classTimerGraphStageLogic
- Parameters:
timerKey
- key of the scheduled timer
-
preStart
public void preStart()
Description copied from class:GraphStageLogic
Invoked before any external events are processed, at the startup of the operator.- Overrides:
preStart
in 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()
-
-