public class BackoffOnRestartSupervisor extends java.lang.Object implements Actor, HandleBackoff, ActorLogging
akka.pattern.BackoffSupervisor.props
with
akka.pattern.Backoff.onFailure
.Actor.emptyBehavior$, Actor.ignoringBehavior$
Constructor and Description |
---|
BackoffOnRestartSupervisor(Props childProps,
java.lang.String childName,
scala.concurrent.duration.FiniteDuration minBackoff,
scala.concurrent.duration.FiniteDuration maxBackoff,
BackoffReset reset,
double randomFactor,
OneForOneStrategy strategy) |
Modifier and Type | Method and Description |
---|---|
scala.Option<ActorRef> |
child() |
java.lang.String |
childName() |
Props |
childProps() |
ActorContext |
context()
Stores the context for this actor, including self, and sender.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
onTerminated() |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receive()
This defines the initial actor behavior, it must return a partial function
with the actor logic.
|
BackoffReset |
reset() |
int |
restartCount() |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, postStop, preRestart, preStart, sender, unhandled
handleBackoff, preStart, startChild
log
public BackoffOnRestartSupervisor(Props childProps, java.lang.String childName, scala.concurrent.duration.FiniteDuration minBackoff, scala.concurrent.duration.FiniteDuration maxBackoff, BackoffReset reset, double randomFactor, OneForOneStrategy strategy)
public scala.Option<ActorRef> child()
child
in interface HandleBackoff
public int restartCount()
restartCount
in interface HandleBackoff
public ActorContext context()
Actor
forward
.
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 a
UntypedActorContext
, which is the Java API of the actor
context.
public final ActorRef self()
Actor
self ! message
public Props childProps()
childProps
in interface HandleBackoff
public java.lang.String childName()
childName
in interface HandleBackoff
public BackoffReset reset()
reset
in interface HandleBackoff
public OneForOneStrategy supervisorStrategy()
Actor
supervisorStrategy
in interface Actor
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> waitChildTerminatedBeforeBackoff(ActorRef childRef)
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> onTerminated()