object BackoffSupervisor
- Source
- BackoffSupervisor.scala
- Alphabetic
- By Inheritance
- BackoffSupervisor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
CurrentChild
(ref: Option[ActorRef]) extends Product with Serializable
Send this message to the BackoffSupervisor and it will reply with BackoffSupervisor.CurrentChild containing the
ActorRef
of the current child, if any. - final case class RestartCount (count: Int) extends Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getCurrentChild: GetCurrentChild.type
Java API: Send this message to the BackoffSupervisor and it will reply with BackoffSupervisor.CurrentChild containing the
ActorRef
of the current child, if any. -
def
getRestartCount: GetRestartCount.type
Java API: Send this message to the BackoffSupervisor and it will reply with BackoffSupervisor.RestartCount containing the current restart count.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
props(options: BackoffOptions): Props
Props for creating a BackoffSupervisor actor from BackoffOptions.
Props for creating a BackoffSupervisor actor from BackoffOptions.
- options
the BackoffOptions that specify how to construct a backoff-supervisor.
-
def
props(childProps: Props, childName: String, minBackoff: FiniteDuration, maxBackoff: FiniteDuration, randomFactor: Double): Props
Props for creating a BackoffSupervisor actor.
Props for creating a BackoffSupervisor actor.
Exceptions in the child are handled with the default supervision strategy, i.e. most exceptions will immediately restart the child. You can define another supervision strategy by using #propsWithSupervisorStrategy.
- childProps
the akka.actor.Props of the child actor that will be started and supervised
- childName
name of the child actor
- minBackoff
minimum (initial) duration until the child actor will started again, if it is terminated
- maxBackoff
the exponential back-off is capped to this duration
- randomFactor
after calculation of the exponential back-off an additional random delay based on this factor is added, e.g.
0.2
adds up to20%
delay. In order to skip this additional delay pass in0
.
-
def
propsWithSupervisorStrategy(childProps: Props, childName: String, minBackoff: FiniteDuration, maxBackoff: FiniteDuration, randomFactor: Double, strategy: SupervisorStrategy): Props
Props for creating a BackoffSupervisor actor with a custom supervision strategy.
Props for creating a BackoffSupervisor actor with a custom supervision strategy.
Exceptions in the child are handled with the given
supervisionStrategy
. ARestart
will perform a normal immediate restart of the child. AStop
will stop the child, but it will be started again after the back-off duration.- childProps
the akka.actor.Props of the child actor that will be started and supervised
- childName
name of the child actor
- minBackoff
minimum (initial) duration until the child actor will started again, if it is terminated
- maxBackoff
the exponential back-off is capped to this duration
- randomFactor
after calculation of the exponential back-off an additional random delay based on this factor is added, e.g.
0.2
adds up to20%
delay. In order to skip this additional delay pass in0
.- strategy
the supervision strategy to use for handling exceptions in the child
-
def
reset: Reset.type
Java API: Send this message to the BackoffSupervisor and it will reset the back-off.
Java API: Send this message to the BackoffSupervisor and it will reset the back-off. This should be used in conjunction with
withManualReset
in BackoffOptions. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
GetCurrentChild
extends Product with Serializable
Send this message to the BackoffSupervisor and it will reply with BackoffSupervisor.CurrentChild containing the
ActorRef
of the current child, if any. -
object
GetRestartCount
extends Product with Serializable
Send this message to the BackoffSupervisor and it will reply with BackoffSupervisor.RestartCount containing the current restart count.
-
object
Reset
extends Product with Serializable
Send this message to the BackoffSupervisor and it will reset the back-off.
Send this message to the BackoffSupervisor and it will reset the back-off. This should be used in conjunction with
withManualReset
in BackoffOptions.