SupervisorStrategy Class |
Namespace: Akka.Actor
The SupervisorStrategy type exposes the following members.
Name | Description | |
---|---|---|
SupervisorStrategy | Initializes a new instance of the SupervisorStrategy class |
Name | Description | |
---|---|---|
Decider |
TBD
| |
LoggingEnabled |
Determines if failures are logged
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Handle |
Handles the specified child.
| |
HandleChildTerminated |
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.
| |
HandleFailure(ActorCell, Exception, ChildRestartStats, IReadOnlyCollectionChildRestartStats) | Obsolete.
TBD
| |
HandleFailure(ActorCell, IActorRef, Exception, ChildRestartStats, IReadOnlyCollectionChildRestartStats) |
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 SupervisorStrategy, which will
log the failure unless it is escalated. You can customize the logging by
setting SupervisorStrategy to `false` and
do the logging inside the `decider` or override the `LogFailure` method.
| |
LogFailure |
Logs the failure.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ProcessFailure(IActorContext, Boolean, Exception, ChildRestartStats, IReadOnlyCollectionChildRestartStats) | Obsolete.
TBD
| |
ProcessFailure(IActorContext, Boolean, IActorRef, Exception, ChildRestartStats, IReadOnlyCollectionChildRestartStats) |
This method is called to act on the failure of a child: restart if the flag is true, stop otherwise.
| |
RestartChild |
Restarts the child.
| |
ResumeChild |
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.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
ToSurrogate |
Creates a surrogate representation of the current SupervisorStrategy.
|
Name | Description | |
---|---|---|
DefaultDecider |
When supervisorStrategy is not specified for an actor this
Decider is used by default in the supervisor strategy.
The child will be stopped when ActorInitializationException,
ActorKilledException, or DeathPactException is
thrown. It will be restarted for other `Exception` types.
The error is escalated if it's a `Exception`, i.e. `Error`.
| |
DefaultStrategy |
When supervisorStrategy is not specified for an actor this
is used by default. OneForOneStrategy with decider defined in
DefaultDecider.
| |
StoppingStrategy |
This strategy resembles Erlang in that failing children are always
terminated (one-for-one).
|
Name | Description | |
---|---|---|
AsInstanceOfT |
TBD
(Defined by Extensions.) | |
Match | Overloaded.
Matches the specified target.
(Defined by PatternMatch.) | |
MatchT | Overloaded.
Matches the specified target and return a result of target processing.
(Defined by PatternMatch.) |