Packages

object BackoffSupervisor

Source
BackoffSupervisor.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BackoffSupervisor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. 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.

  2. final case class RestartCount(count: Int) extends Product with Serializable

Value Members

  1. 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.

  2. def getRestartCount: GetRestartCount.type

    Java API: Send this message to the BackoffSupervisor and it will reply with BackoffSupervisor.RestartCount containing the current restart count.

  3. 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.

  4. def props(childProps: Props, childName: String, minBackoff: Duration, maxBackoff: Duration, randomFactor: Double, maxNrOfRetries: Int): 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 to 20% delay. In order to skip this additional delay pass in 0.

    maxNrOfRetries

    maximum number of attempts to restart the child actor. The supervisor will terminate itself after the maxNoOfRetries is reached. In order to restart infinitely pass in -1.

  5. def props(childProps: Props, childName: String, minBackoff: Duration, maxBackoff: Duration, 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 to 20% delay. In order to skip this additional delay pass in 0.

  6. def props(childProps: Props, childName: String, minBackoff: FiniteDuration, maxBackoff: FiniteDuration, randomFactor: Double, maxNrOfRetries: Int): 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 to 20% delay. In order to skip this additional delay pass in 0.

    maxNrOfRetries

    maximum number of attempts to restart the child actor. The supervisor will terminate itself after the maxNoOfRetries is reached. In order to restart infinitely pass in -1.

  7. 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 to 20% delay. In order to skip this additional delay pass in 0.

  8. def propsWithSupervisorStrategy(childProps: Props, childName: String, minBackoff: Duration, maxBackoff: Duration, 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. A Restart will perform a normal immediate restart of the child. A Stop 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 to 20% delay. In order to skip this additional delay pass in 0.

    strategy

    the supervision strategy to use for handling exceptions in the child. As the BackoffSupervisor creates a separate actor to handle the backoff process, only a OneForOneStrategy makes sense here.

  9. 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. A Restart will perform a normal immediate restart of the child. A Stop 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 to 20% delay. In order to skip this additional delay pass in 0.

    strategy

    the supervision strategy to use for handling exceptions in the child. As the BackoffSupervisor creates a separate actor to handle the backoff process, only a OneForOneStrategy makes sense here.

  10. 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.

  11. 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.

  12. object GetRestartCount extends Product with Serializable

    Send this message to the BackoffSupervisor and it will reply with BackoffSupervisor.RestartCount containing the current restart count.

  13. 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.