Package akka.actor
Class SupervisorStrategy$
- java.lang.Object
-
- akka.actor.SupervisorStrategy$
-
- All Implemented Interfaces:
SupervisorStrategyLowPriorityImplicits
public class SupervisorStrategy$ extends java.lang.Object implements SupervisorStrategyLowPriorityImplicits
Resumes message processing for the failed Actor
-
-
Field Summary
Fields Modifier and Type Field Description static SupervisorStrategy$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description SupervisorStrategy$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive>
defaultDecider()
When supervisorStrategy is not specified for an actor thisDecider
is used by default in the supervisor strategy.SupervisorStrategy
defaultStrategy()
When supervisorStrategy is not specified for an actor this is used by default.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.scala.Function1<java.lang.Object,SupervisorStrategy.Escalate$>
escalateDefault()
scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive>
makeDecider(Function<java.lang.Throwable,SupervisorStrategy.Directive> func)
Converts a Java Decider into a Scala Deciderscala.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.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.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.scala.Option<java.lang.Object>
maxNrOfRetriesOption(int maxNrOfRetries)
SupervisorStrategy.Restart$
restart()
Java API: Returning this directive discards the old Actor instance and replaces it with a new, then resumes message processing.SupervisorStrategy.Resume$
resume()
scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive>
seqThrowable2Decider(scala.collection.immutable.Seq<java.lang.Class<? extends java.lang.Throwable>> trapExit)
Implicit conversion fromSeq
of Throwables to aDecider
.scala.collection.immutable.Seq<scala.Tuple2<java.lang.Class<? extends java.lang.Throwable>,SupervisorStrategy.Directive>>
sort(scala.collection.Iterable<scala.Tuple2<java.lang.Class<? extends java.lang.Throwable>,SupervisorStrategy.Directive>> in)
Sort so that subtypes always precede their supertypes, but without obeying any order between unrelated subtypes (insert sort).SupervisorStrategy.Stop$
stop()
Java API: Returning this directive stops the ActorSupervisorStrategy
stoppingStrategy()
This strategy resembles Erlang in that failing children are always terminated (one-for-one).scala.Option<scala.concurrent.duration.Duration>
withinTimeRangeOption(scala.concurrent.duration.Duration withinTimeRange)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.SupervisorStrategyLowPriorityImplicits
seqCauseDirective2Decider
-
-
-
-
Field Detail
-
MODULE$
public static final SupervisorStrategy$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
resume
public SupervisorStrategy.Resume$ resume()
-
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.- Returns:
- (undocumented)
-
stop
public SupervisorStrategy.Stop$ stop()
Java API: Returning this directive stops the Actor- Returns:
- (undocumented)
-
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.- Returns:
- (undocumented)
-
defaultDecider
public final scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> defaultDecider()
When supervisorStrategy is not specified for an actor thisDecider
is used by default in the supervisor strategy. The child will be stopped whenActorInitializationException
,ActorKilledException
, orDeathPactException
is thrown. It will be restarted for otherException
types. The error is escalated if it's aThrowable
, i.e.Error
.- Returns:
- (undocumented)
-
defaultStrategy
public final SupervisorStrategy defaultStrategy()
When supervisorStrategy is not specified for an actor this is used by default. OneForOneStrategy with decider defined indefaultDecider()
.- Returns:
- (undocumented)
-
stoppingStrategy
public final SupervisorStrategy stoppingStrategy()
This strategy resembles Erlang in that failing children are always terminated (one-for-one).- Returns:
- (undocumented)
-
seqThrowable2Decider
public scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> seqThrowable2Decider(scala.collection.immutable.Seq<java.lang.Class<? extends java.lang.Throwable>> trapExit)
Implicit conversion fromSeq
of Throwables to aDecider
. This maps the given Throwables to restarts, otherwise escalates.- Parameters:
trapExit
- (undocumented)- Returns:
- (undocumented)
-
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.- Parameters:
trapExit
- (undocumented)- Returns:
- (undocumented)
-
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.- Parameters:
trapExit
- (undocumented)- Returns:
- (undocumented)
-
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.- Parameters:
flat
- (undocumented)- Returns:
- (undocumented)
-
makeDecider
public scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> makeDecider(Function<java.lang.Throwable,SupervisorStrategy.Directive> func)
Converts a Java Decider into a Scala Decider- Parameters:
func
- (undocumented)- Returns:
- (undocumented)
-
sort
public scala.collection.immutable.Seq<scala.Tuple2<java.lang.Class<? extends java.lang.Throwable>,SupervisorStrategy.Directive>> sort(scala.collection.Iterable<scala.Tuple2<java.lang.Class<? extends java.lang.Throwable>,SupervisorStrategy.Directive>> in)
Sort so that subtypes always precede their supertypes, but without obeying any order between unrelated subtypes (insert sort).INTERNAL API
- Parameters:
in
- (undocumented)- Returns:
- (undocumented)
-
withinTimeRangeOption
public scala.Option<scala.concurrent.duration.Duration> withinTimeRangeOption(scala.concurrent.duration.Duration withinTimeRange)
-
maxNrOfRetriesOption
public scala.Option<java.lang.Object> maxNrOfRetriesOption(int maxNrOfRetries)
-
escalateDefault
public scala.Function1<java.lang.Object,SupervisorStrategy.Escalate$> escalateDefault()
-
-