Package akka.actor
Class AllForOneStrategy
- java.lang.Object
-
- akka.actor.SupervisorStrategy
-
- akka.actor.AllForOneStrategy
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
,scala.Serializable
public class AllForOneStrategy extends SupervisorStrategy implements scala.Product, scala.Serializable
Java API- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.actor.SupervisorStrategy
SupervisorStrategy.Directive, SupervisorStrategy.Escalate$, SupervisorStrategy.Restart$, SupervisorStrategy.Resume$, SupervisorStrategy.Stop$
-
-
Constructor Summary
Constructors Constructor Description AllForOneStrategy(boolean loggingEnabled, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API: compatible with lambda expressionsAllForOneStrategy(int maxNrOfRetries, java.time.Duration withinTimeRange, Function<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java APIAllForOneStrategy(int maxNrOfRetries, java.time.Duration withinTimeRange, Function<java.lang.Throwable,SupervisorStrategy.Directive> decider, boolean loggingEnabled)
Java APIAllForOneStrategy(int maxNrOfRetries, java.time.Duration withinTimeRange, java.lang.Iterable<java.lang.Class<? extends java.lang.Throwable>> trapExit)
Java APIAllForOneStrategy(int maxNrOfRetries, java.time.Duration withinTimeRange, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API: compatible with lambda expressionsAllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, boolean loggingEnabled, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
AllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, Function<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java APIAllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, Function<java.lang.Throwable,SupervisorStrategy.Directive> decider, boolean loggingEnabled)
AllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, java.lang.Iterable<java.lang.Class<? extends java.lang.Throwable>> trapExit)
Java APIAllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API: compatible with lambda expressionsAllForOneStrategy(scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API: compatible with lambda expressions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
$lessinit$greater$default$1()
static scala.concurrent.duration.Duration
$lessinit$greater$default$2()
static boolean
$lessinit$greater$default$3()
static AllForOneStrategy
apply(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, boolean loggingEnabled, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
static int
apply$default$1()
static scala.concurrent.duration.Duration
apply$default$2()
static boolean
apply$default$3()
boolean
canEqual(java.lang.Object x$1)
AllForOneStrategy
copy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, boolean loggingEnabled, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
int
copy$default$1()
scala.concurrent.duration.Duration
copy$default$2()
boolean
copy$default$3()
scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive>
decider()
boolean
equals(java.lang.Object x$1)
void
handleChildTerminated(ActorContext context, ActorRef child, scala.collection.Iterable<ActorRef> children)
This method is called after the child has been removed from the set of children.int
hashCode()
boolean
loggingEnabled()
Logging of actor failures is done when this istrue
.int
maxNrOfRetries()
void
processFailure(ActorContext context, boolean restart, ActorRef child, java.lang.Throwable cause, ChildRestartStats stats, scala.collection.Iterable<ChildRestartStats> children)
This method is called to act on the failure of a child: restart if the flag is true, stop otherwise.int
productArity()
java.lang.Object
productElement(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
java.lang.String
toString()
static scala.Option<scala.Tuple3<java.lang.Object,scala.concurrent.duration.Duration,java.lang.Object>>
unapply(AllForOneStrategy x$0)
scala.concurrent.duration.Duration
withinTimeRange()
-
Methods inherited from class akka.actor.SupervisorStrategy
defaultDecider, defaultStrategy, escalate, escalateDefault, handleFailure, logFailure, makeDecider, makeDecider, makeDecider, makeDecider, maxNrOfRetriesOption, restart, restartChild, resume, resumeChild, seqCauseDirective2Decider, seqThrowable2Decider, sort, stop, stoppingStrategy, withinTimeRangeOption
-
-
-
-
Constructor Detail
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, boolean loggingEnabled, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, Function<java.lang.Throwable,SupervisorStrategy.Directive> decider, boolean loggingEnabled)
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, java.time.Duration withinTimeRange, Function<java.lang.Throwable,SupervisorStrategy.Directive> decider, boolean loggingEnabled)
Java API- Parameters:
maxNrOfRetries
- (undocumented)withinTimeRange
- (undocumented)decider
- (undocumented)loggingEnabled
- (undocumented)
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, Function<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API- Parameters:
maxNrOfRetries
- (undocumented)withinTimeRange
- (undocumented)decider
- (undocumented)
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, java.time.Duration withinTimeRange, Function<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API- Parameters:
maxNrOfRetries
- (undocumented)withinTimeRange
- (undocumented)decider
- (undocumented)
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, java.lang.Iterable<java.lang.Class<? extends java.lang.Throwable>> trapExit)
Java API- Parameters:
maxNrOfRetries
- (undocumented)withinTimeRange
- (undocumented)trapExit
- (undocumented)
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, java.time.Duration withinTimeRange, java.lang.Iterable<java.lang.Class<? extends java.lang.Throwable>> trapExit)
Java API- Parameters:
maxNrOfRetries
- (undocumented)withinTimeRange
- (undocumented)trapExit
- (undocumented)
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API: compatible with lambda expressions- Parameters:
maxNrOfRetries
- (undocumented)withinTimeRange
- (undocumented)decider
- (undocumented)
-
AllForOneStrategy
public AllForOneStrategy(int maxNrOfRetries, java.time.Duration withinTimeRange, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API: compatible with lambda expressions- Parameters:
maxNrOfRetries
- (undocumented)withinTimeRange
- (undocumented)decider
- (undocumented)
-
AllForOneStrategy
public AllForOneStrategy(boolean loggingEnabled, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API: compatible with lambda expressions- Parameters:
loggingEnabled
- (undocumented)decider
- (undocumented)
-
AllForOneStrategy
public AllForOneStrategy(scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
Java API: compatible with lambda expressions- Parameters:
decider
- (undocumented)
-
-
Method Detail
-
$lessinit$greater$default$1
public static int $lessinit$greater$default$1()
-
$lessinit$greater$default$2
public static scala.concurrent.duration.Duration $lessinit$greater$default$2()
-
$lessinit$greater$default$3
public static boolean $lessinit$greater$default$3()
-
apply
public static AllForOneStrategy apply(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, boolean loggingEnabled, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
-
apply$default$1
public static int apply$default$1()
-
apply$default$2
public static scala.concurrent.duration.Duration apply$default$2()
-
apply$default$3
public static boolean apply$default$3()
-
unapply
public static scala.Option<scala.Tuple3<java.lang.Object,scala.concurrent.duration.Duration,java.lang.Object>> unapply(AllForOneStrategy x$0)
-
maxNrOfRetries
public int maxNrOfRetries()
-
withinTimeRange
public scala.concurrent.duration.Duration withinTimeRange()
-
loggingEnabled
public boolean loggingEnabled()
Description copied from class:SupervisorStrategy
Logging of actor failures is done when this istrue
.- Overrides:
loggingEnabled
in classSupervisorStrategy
- Returns:
- (undocumented)
-
decider
public scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider()
- Specified by:
decider
in classSupervisorStrategy
-
handleChildTerminated
public void handleChildTerminated(ActorContext context, ActorRef child, scala.collection.Iterable<ActorRef> children)
Description copied from class:SupervisorStrategy
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.- Specified by:
handleChildTerminated
in classSupervisorStrategy
- Parameters:
context
- (undocumented)child
- (undocumented)children
- (undocumented)
-
processFailure
public void processFailure(ActorContext context, boolean restart, ActorRef child, java.lang.Throwable cause, ChildRestartStats stats, scala.collection.Iterable<ChildRestartStats> children)
Description copied from class:SupervisorStrategy
This method is called to act on the failure of a child: restart if the flag is true, stop otherwise.- Specified by:
processFailure
in classSupervisorStrategy
- Parameters:
context
- (undocumented)restart
- (undocumented)child
- (undocumented)cause
- (undocumented)stats
- (undocumented)children
- (undocumented)
-
copy
public AllForOneStrategy copy(int maxNrOfRetries, scala.concurrent.duration.Duration withinTimeRange, boolean loggingEnabled, scala.PartialFunction<java.lang.Throwable,SupervisorStrategy.Directive> decider)
-
copy$default$1
public int copy$default$1()
-
copy$default$2
public scala.concurrent.duration.Duration copy$default$2()
-
copy$default$3
public boolean copy$default$3()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-