Package akka.actor

Class SupervisorStrategy$

    • Field Detail

      • MODULE$

        public static final SupervisorStrategy$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • SupervisorStrategy$

        public SupervisorStrategy$()
    • Method Detail

      • resume

        public SupervisorStrategy.Resume$ resume()
        Java API: Returning this directive resumes message processing for the failed Actor
      • resume

        public SupervisorStrategy.Directive resume​(Logging.LogLevel logLevel)
        Returning this directive resumes message processing for the failed Actor.

        Parameters:
        logLevel - Log level which will be used to log the failure
      • restart

        public SupervisorStrategy.Restart$ restart()
        Java API: Returning this directive discards the old Actor instance and replaces it with a new, then resumes message processing.
      • restart

        public SupervisorStrategy.Directive restart​(Logging.LogLevel logLevel)
        Returning this directive discards the old Actor instance and replaces it with a new, then resumes message processing.

        Parameters:
        logLevel - Log level which will be used to log the failure
      • escalate

        public SupervisorStrategy.Escalate$ escalate()
        Java API: Returning this directive escalates the failure to the supervisor of the supervisor, by rethrowing the cause of the failure, i.e. the supervisor fails with the same exception as the child.
      • defaultStrategy

        public final SupervisorStrategy defaultStrategy()
        When supervisorStrategy is not specified for an actor this is used by default. OneForOneStrategy with decider defined in defaultDecider().
      • stoppingStrategy

        public final SupervisorStrategy stoppingStrategy()
        This strategy resembles Erlang in that failing children are always terminated (one-for-one).
      • seqThrowable2Decider

        public scala.PartialFunction<java.lang.Throwable,​SupervisorStrategy.Directive> seqThrowable2Decider​(scala.collection.immutable.Seq<java.lang.Class<? extends java.lang.Throwable>> trapExit)
        Implicit conversion from Seq of Throwables to a Decider. This maps the given Throwables to restarts, otherwise escalates.
      • makeDecider

        public scala.PartialFunction<java.lang.Throwable,​SupervisorStrategy.Directive> makeDecider​(scala.collection.immutable.Seq<java.lang.Class<? extends java.lang.Throwable>> trapExit)
        Decider builder which just checks whether one of the given Throwables matches the cause and restarts, otherwise escalates.
      • makeDecider

        public scala.PartialFunction<java.lang.Throwable,​SupervisorStrategy.Directive> makeDecider​(java.lang.Iterable<java.lang.Class<? extends java.lang.Throwable>> trapExit)
        Decider builder which just checks whether one of the given Throwables matches the cause and restarts, otherwise escalates.
      • makeDecider

        public scala.PartialFunction<java.lang.Throwable,​SupervisorStrategy.Directive> makeDecider​(scala.collection.Iterable<scala.Tuple2<java.lang.Class<? extends java.lang.Throwable>,​SupervisorStrategy.Directive>> flat)
        Decider builder for Iterables of cause-directive pairs, e.g. a map obtained from configuration; will sort the pairs so that the most specific type is checked before all its subtypes, allowing carving out subtrees of the Throwable hierarchy.