OneForOneStrategy Constructor (Int32, Int32, FuncException, Directive, Boolean) |
Applies the fault handling `Directive` (Resume, Restart, Stop) specified in the `Decider`
to all children when one fails, as opposed to
OneForOneStrategy that applies
it only to the child actor that failed.
Namespace: Akka.ActorAssembly: Akka (in Akka.dll) Version: 0.8.0.0 (0.8.0.0)
Syntaxpublic OneForOneStrategy(
int maxNrOfRetries,
int withinTimeMilliseconds,
Func<Exception, Directive> decider,
bool loggingEnabled = true
)
Public Sub New (
maxNrOfRetries As Integer,
withinTimeMilliseconds As Integer,
decider As Func(Of Exception, Directive),
Optional loggingEnabled As Boolean = true
)
public:
OneForOneStrategy(
int maxNrOfRetries,
int withinTimeMilliseconds,
Func<Exception^, Directive>^ decider,
bool loggingEnabled = true
)
new :
maxNrOfRetries : int *
withinTimeMilliseconds : int *
decider : Func<Exception, Directive> *
?loggingEnabled : bool
(* Defaults:
let _loggingEnabled = defaultArg loggingEnabled true
*)
-> OneForOneStrategy
Parameters
- maxNrOfRetries
- Type: SystemInt32
the number of times a child actor is allowed to be restarted, negative value means no limit,
if the limit is exceeded the child actor is stopped.
- withinTimeMilliseconds
- Type: SystemInt32
duration in milliseconds of the time window for maxNrOfRetries, negative values means no window. - decider
- Type: SystemFuncException, Directive
Mapping from an Exception to Directive - loggingEnabled (Optional)
- Type: SystemBoolean
If true failures will be logged
See Also