Click or drag to resize
SupervisorStrategy Class
Base class for supervision strategies
Inheritance Hierarchy

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

The SupervisorStrategy type exposes the following members.

Constructors
  NameDescription
Protected methodSupervisorStrategy
Initializes a new instance of the SupervisorStrategy class
Top
Methods
  NameDescription
Public methodStatic 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 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 a hash function for a particular type.
(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
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
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.)
Top
Extension Methods
Properties
  NameDescription
Public propertyStatic memberDefaultStrategy
When supervisorStrategy is not specified for an actor this is used by default. OneForOneStrategy with decider defined in DefaultDecider(Exception).
Protected propertyLoggingEnabled
Top
See Also