Package akka.pattern.internal
Class BackoffOnRestartSupervisor
- java.lang.Object
-
- akka.pattern.internal.BackoffOnRestartSupervisor
-
- All Implemented Interfaces:
Actor
,ActorLogging
,HandleBackoff
public class BackoffOnRestartSupervisor extends java.lang.Object implements Actor, HandleBackoff, ActorLogging
INTERNAL APIBack-off supervisor that stops and starts a child actor when the child actor restarts. This back-off supervisor is created by using
akka.pattern.BackoffSupervisor.props
with
akka.pattern.BackoffOpts.onFailure
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description BackoffOnRestartSupervisor(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, BackoffReset reset, double randomFactor, OneForOneStrategy strategy, scala.Option<java.lang.Object> replyWhileStopped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
protected void
akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
The 'self' field holds the ActorRef for this actor.scala.Option<ActorRef>
child()
void
child_$eq(scala.Option<ActorRef> x$1)
java.lang.String
childName()
Props
childProps()
ActorContext
context()
Scala API: Stores the context for this actor, including self, and sender.boolean
finalStopMessageReceived()
void
finalStopMessageReceived_$eq(boolean x$1)
protected void
handleMessageToChild(java.lang.Object msg)
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
onTerminated()
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receive()
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.BackoffReset
reset()
int
restartCount()
void
restartCount_$eq(int x$1)
ActorRef
self()
The 'self' field holds the ActorRef for this actor.OneForOneStrategy
supervisorStrategy()
User overridable definition the strategy to use for supervising child actors.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
waitChildTerminatedBeforeBackoff(ActorRef childRef)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, postStop, preRestart, preStart, sender, unhandled
-
Methods inherited from interface akka.actor.ActorLogging
_log_$eq, log
-
Methods inherited from interface akka.pattern.HandleBackoff
handleBackoff, preStart, startChild
-
-
-
-
Constructor Detail
-
BackoffOnRestartSupervisor
public BackoffOnRestartSupervisor(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, BackoffReset reset, double randomFactor, OneForOneStrategy strategy, scala.Option<java.lang.Object> replyWhileStopped)
-
-
Method Detail
-
akka$actor$Actor$_setter_$context_$eq
protected void akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
- Specified by:
akka$actor$Actor$_setter_$context_$eq
in interfaceActor
-
akka$actor$Actor$_setter_$self_$eq
protected final void akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
Description copied from interface:Actor
The 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
- Specified by:
akka$actor$Actor$_setter_$self_$eq
in interfaceActor
- Parameters:
x$1
- (undocumented)
-
child
public scala.Option<ActorRef> child()
- Specified by:
child
in interfaceHandleBackoff
-
childName
public java.lang.String childName()
- Specified by:
childName
in interfaceHandleBackoff
-
childProps
public Props childProps()
- Specified by:
childProps
in interfaceHandleBackoff
-
child_$eq
public void child_$eq(scala.Option<ActorRef> x$1)
- Specified by:
child_$eq
in interfaceHandleBackoff
-
context
public ActorContext context()
Description copied from interface:Actor
Scala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such asforward
.WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
ActorContext
is the Scala API.getContext
returns aAbstractActor.ActorContext
, which is the Java API of the actor context.
-
finalStopMessageReceived
public boolean finalStopMessageReceived()
- Specified by:
finalStopMessageReceived
in interfaceHandleBackoff
-
finalStopMessageReceived_$eq
public void finalStopMessageReceived_$eq(boolean x$1)
- Specified by:
finalStopMessageReceived_$eq
in interfaceHandleBackoff
-
handleMessageToChild
protected void handleMessageToChild(java.lang.Object msg)
- Specified by:
handleMessageToChild
in interfaceHandleBackoff
-
onTerminated
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> onTerminated()
-
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface:Actor
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.
-
reset
public BackoffReset reset()
- Specified by:
reset
in interfaceHandleBackoff
-
restartCount
public int restartCount()
- Specified by:
restartCount
in interfaceHandleBackoff
-
restartCount_$eq
public void restartCount_$eq(int x$1)
- Specified by:
restartCount_$eq
in interfaceHandleBackoff
-
self
public final ActorRef self()
Description copied from interface:Actor
The 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
-
supervisorStrategy
public OneForOneStrategy supervisorStrategy()
Description copied from interface:Actor
User overridable definition the strategy to use for supervising child actors.- Specified by:
supervisorStrategy
in interfaceActor
- Returns:
- (undocumented)
-
waitChildTerminatedBeforeBackoff
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitChildTerminatedBeforeBackoff(ActorRef childRef)
-
-