akka.actor

AllForOneStrategy

case class AllForOneStrategy(maxNrOfRetries: Int, withinTimeRange: Duration, decider: Decider) extends SupervisorStrategy with Product with Serializable

Applies the fault handling Directive (Resume, Restart, Stop) specified in the Decider to all children when one fails, as opposed to OneForOneStrategy that applies it only to the child actor that failed.

maxNrOfRetries

the number of times an actor is allowed to be restarted, negative value means no limit

withinTimeRange

duration of the time window for maxNrOfRetries, Duration.Inf means no window

decider

mapping from Throwable to Directive, you can also use a Seq of Throwables which maps the given Throwables to restarts, otherwise escalates.

Linear Supertypes
Serializable, Serializable, Product, Equals, SupervisorStrategy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. AllForOneStrategy
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. SupervisorStrategy
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AllForOneStrategy(maxNrOfRetries: Int, withinTimeRange: Duration, trapExit: Array[Class[_]])

  2. new AllForOneStrategy(maxNrOfRetries: Int, withinTimeRange: Duration, trapExit: Iterable[Class[_ <: Throwable]])

  3. new AllForOneStrategy(maxNrOfRetries: Int, withinTimeRange: Duration, decider: JDecider)

  4. new AllForOneStrategy(maxNrOfRetries: Int = -1, withinTimeRange: Duration = akka.util.Duration.Inf)(decider: Decider)

    maxNrOfRetries

    the number of times an actor is allowed to be restarted, negative value means no limit

    withinTimeRange

    duration of the time window for maxNrOfRetries, Duration.Inf means no window

    decider

    mapping from Throwable to Directive, you can also use a Seq of Throwables which maps the given Throwables to restarts, otherwise escalates.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def canEqual(arg0: Any): Boolean

    Definition Classes
    AllForOneStrategy → Equals
  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. val decider: Decider

    mapping from Throwable to Directive, you can also use a Seq of Throwables which maps the given Throwables to restarts, otherwise escalates.

    mapping from Throwable to Directive, you can also use a Seq of Throwables which maps the given Throwables to restarts, otherwise escalates.

    Definition Classes
    AllForOneStrategySupervisorStrategy
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AllForOneStrategy → Equals → AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  14. def handleChildTerminated(context: ActorContext, child: ActorRef, children: Iterable[ActorRef]): Unit

    This method is called after the child has been removed from the set of children.

    This method is called after the child has been removed from the set of children.

    Definition Classes
    AllForOneStrategySupervisorStrategy
  15. def handleFailure(context: ActorContext, child: ActorRef, cause: Throwable, stats: ChildRestartStats, children: Iterable[ChildRestartStats]): Boolean

    Returns whether it processed the failure or not

    Returns whether it processed the failure or not

    Definition Classes
    SupervisorStrategy
  16. def handleSupervisorFailing(supervisor: ActorRef, children: Iterable[ActorRef]): Unit

    Definition Classes
    SupervisorStrategy
  17. def handleSupervisorRestarted(cause: Throwable, supervisor: ActorRef, children: Iterable[ActorRef]): Unit

    Definition Classes
    SupervisorStrategy
  18. def hashCode(): Int

    Definition Classes
    AllForOneStrategy → AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. val maxNrOfRetries: Int

    the number of times an actor is allowed to be restarted, negative value means no limit

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. def processFailure(context: ActorContext, restart: Boolean, child: ActorRef, cause: Throwable, stats: ChildRestartStats, children: Iterable[ChildRestartStats]): Unit

    This method is called to act on the failure of a child: restart if the flag is true, stop otherwise.

    This method is called to act on the failure of a child: restart if the flag is true, stop otherwise.

    Definition Classes
    AllForOneStrategySupervisorStrategy
  25. def productArity: Int

    Definition Classes
    AllForOneStrategy → Product
  26. def productElement(arg0: Int): Any

    Definition Classes
    AllForOneStrategy → Product
  27. def productIterator: Iterator[Any]

    Definition Classes
    Product
  28. def productPrefix: String

    Definition Classes
    AllForOneStrategy → Product
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    AllForOneStrategy → AnyRef → Any
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. val withinTimeRange: Duration

    duration of the time window for maxNrOfRetries, Duration.

    duration of the time window for maxNrOfRetries, Duration.Inf means no window

Deprecated Value Members

  1. def productElements: Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from SupervisorStrategy

Inherited from AnyRef

Inherited from Any