AllForOneStrategy Constructor (Nullable<(Of <(<'Int32>)>)>, Nullable<(Of <(<'TimeSpan>)>)>, Func<(Of <(<'Exception, Directive>)>)>)

Applies the fault handling `Directive` (Resume, Restart, Stop) specified in the `Decider` to all children when one fails, as opposed to [[Akka.Actor.AllForOneStrategy]] that applies it only to the child actor that failed.

Namespace:  Akka.Actor
Assembly:  Akka (in Akka.dll)

Syntax


public AllForOneStrategy(
	Nullable<int> maxNrOfRetries,
	Nullable<TimeSpan> withinTimeRange,
	Func<Exception, Directive> decider
)
Public Sub New ( _
	maxNrOfRetries As Nullable(Of Integer), _
	withinTimeRange As Nullable(Of TimeSpan), _
	decider As Func(Of Exception, Directive) _
)
public:
AllForOneStrategy(
	Nullable<int^> maxNrOfRetries, 
	Nullable<TimeSpan^> withinTimeRange, 
	Func<Exception^, Directive^>^ decider
)

Parameters

maxNrOfRetries
Type: Nullable<(Of <(<'Int32>)>)>
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.
withinTimeRange
Type: Nullable<(Of <(<'TimeSpan>)>)>
duration of the time window for maxNrOfRetries, Duration.Inf means no window.
decider
Type: Func<(Of <(<'Exception, Directive>)>)>
mapping from Exception to [[Akka.Actor.SupervisorStrategy.Directive]]