class ClusterMetricsStrategy extends OneForOneStrategy

Default ClusterMetricsSupervisor strategy: A configurable akka.actor.OneForOneStrategy with restart-on-throwable decider.

Source
ClusterMetricsStrategy.scala
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClusterMetricsStrategy
  2. OneForOneStrategy
  3. Serializable
  4. Serializable
  5. Product
  6. Equals
  7. SupervisorStrategy
  8. AnyRef
  9. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ClusterMetricsStrategy(config: Config)

Value Members

  1. val decider: Decider

    Returns the Decider that is associated with this SupervisorStrategy.

    Returns the Decider that is associated with this SupervisorStrategy. The Decider is invoked by the default implementation of handleFailure to obtain the Directive to be applied.

    Definition Classes
    OneForOneStrategySupervisorStrategy
  2. 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. It does not need to do anything special. Exceptions thrown from this method do NOT make the actor fail if this happens during termination.

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

    This is the main entry point: in case of a child’s failure, this method must try to handle the failure by resuming, restarting or stopping the child (and returning true), or it returns false to escalate the failure, which will lead to this actor re-throwing the exception which caused the failure.

    This is the main entry point: in case of a child’s failure, this method must try to handle the failure by resuming, restarting or stopping the child (and returning true), or it returns false to escalate the failure, which will lead to this actor re-throwing the exception which caused the failure. The exception will not be wrapped.

    This method calls akka.actor.SupervisorStrategy#logFailure, which will log the failure unless it is escalated. You can customize the logging by setting akka.actor.SupervisorStrategy#loggingEnabled to false and do the logging inside the decider or override the logFailure method.

    children

    is a lazy collection (a view)

    Definition Classes
    SupervisorStrategy
  4. def logFailure(context: ActorContext, child: ActorRef, cause: Throwable, decision: Directive): Unit

    Default logging of actor failures when akka.actor.SupervisorStrategy#loggingEnabled is true.

    Default logging of actor failures when akka.actor.SupervisorStrategy#loggingEnabled is true. Escalate failures are not logged here, since they are supposed to be handled at a level higher up in the hierarchy. Resume failures are logged at Warning level. Stop and Restart failures are logged at Error level.

    Definition Classes
    SupervisorStrategy
  5. val loggingEnabled: Boolean

    Logging of actor failures is done when this is true.

    Logging of actor failures is done when this is true.

    Definition Classes
    OneForOneStrategySupervisorStrategy
  6. val maxNrOfRetries: Int
    Definition Classes
    OneForOneStrategy
  7. 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
    OneForOneStrategySupervisorStrategy
  8. final def restartChild(child: ActorRef, cause: Throwable, suspendFirst: Boolean): Unit

    Restart the given child, possibly suspending it first.

    Restart the given child, possibly suspending it first.

    IMPORTANT:

    If the child is the currently failing one, it will already have been suspended, hence suspendFirst must be false. If the child is not the currently failing one, then it did not request this treatment and is therefore not prepared to be resumed without prior suspend.

    Definition Classes
    SupervisorStrategy
  9. final def resumeChild(child: ActorRef, cause: Throwable): Unit

    Resume the previously failed child: do never apply this to a child which is not the currently failing child.

    Resume the previously failed child: do never apply this to a child which is not the currently failing child. Suspend/resume needs to be done in matching pairs, otherwise actors will wake up too soon or never at all.

    Definition Classes
    SupervisorStrategy
  10. def withMaxNrOfRetries(maxNrOfRetries: Int): OneForOneStrategy
    Definition Classes
    OneForOneStrategy
  11. val withinTimeRange: Duration
    Definition Classes
    OneForOneStrategy