Click or drag to resize
Akka.NETSupervisorStrategy Class
Base class for supervision strategies
Inheritance Hierarchy

Namespace:  Akka.Actor
Assembly:  Akka (in Akka.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax
public abstract class SupervisorStrategy : ISurrogated

The SupervisorStrategy type exposes the following members.

Constructors
  NameDescription
Protected methodSupervisorStrategy
Initializes a new instance of the SupervisorStrategy class
Top
Properties
  NameDescription
Public propertyDecider
TBD
Protected propertyLoggingEnabled
Determines if failures are logged
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodHandle
Handles the specified child.
Public methodHandleChildTerminated
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.
Public methodHandleFailure(ActorCell, Exception, ChildRestartStats, IReadOnlyCollectionChildRestartStats) Obsolete.
TBD
Public methodHandleFailure(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.
Protected methodLogFailure
Logs the failure.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodProcessFailure(IActorContext, Boolean, Exception, ChildRestartStats, IReadOnlyCollectionChildRestartStats) Obsolete.
TBD
Protected methodProcessFailure(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.
Protected methodRestartChild
Restarts the child.
Protected methodResumeChild
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.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodToSurrogate
Creates a surrogate representation of the current SupervisorStrategy.
Top
Fields
  NameDescription
Public fieldStatic memberDefaultDecider
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`.
Public fieldStatic memberDefaultStrategy
When supervisorStrategy is not specified for an actor this is used by default. OneForOneStrategy with decider defined in DefaultDecider.
Public fieldStatic memberStoppingStrategy
This strategy resembles Erlang in that failing children are always terminated (one-for-one).
Top
Extension Methods
See Also