ExperimentRetryPolicy
NexusLabs.Foundry.Evaluation¶
NexusLabs.Foundry.Evaluation.Experiments¶
ExperimentRetryPolicy Class¶
Provides a bounded retry policy with explicit outcome selection and delay calculation.
public sealed class ExperimentRetryPolicy : NexusLabs.Foundry.Evaluation.Experiments.IExperimentRetryPolicy
Inheritance System.Object 🡒 ExperimentRetryPolicy
Implements IExperimentRetryPolicy
Constructors¶
ExperimentRetryPolicy(int, ExperimentRetryableOutcome, ExperimentRetryDelayProvider) Constructor¶
Initializes a bounded retry policy with caller-defined delay calculation.
public ExperimentRetryPolicy(int maxAttempts, NexusLabs.Foundry.Evaluation.Experiments.ExperimentRetryableOutcome retryOn, NexusLabs.Foundry.Evaluation.Experiments.ExperimentRetryDelayProvider delayProvider);
Parameters¶
maxAttempts System.Int32
The maximum total attempt count, including the initial attempt.
retryOn ExperimentRetryableOutcome
The execution outcomes eligible for retry.
delayProvider ExperimentRetryDelayProvider(ExperimentRetryContext)
The explicit delay calculation. Reproducible jitter requires caller-controlled deterministic state, such as a seeded random source.
ExperimentRetryPolicy(int, ExperimentRetryableOutcome, TimeSpan) Constructor¶
Initializes a bounded fixed-delay retry policy.
public ExperimentRetryPolicy(int maxAttempts, NexusLabs.Foundry.Evaluation.Experiments.ExperimentRetryableOutcome retryOn, System.TimeSpan delay);
Parameters¶
maxAttempts System.Int32
The maximum total attempt count, including the initial attempt.
retryOn ExperimentRetryableOutcome
The execution outcomes eligible for retry.
delay System.TimeSpan
The delay before each selected retry.
Properties¶
ExperimentRetryPolicy.MaxAttempts Property¶
Gets the maximum number of attempts permitted for one item.
Implements MaxAttempts
Property Value¶
ExperimentRetryPolicy.RetryOn Property¶
Gets the execution outcomes eligible for retry.
Property Value¶
Methods¶
ExperimentRetryPolicy.Decide(ExperimentRetryContext) Method¶
Decides whether a completed execution attempt should be retried.
public NexusLabs.Foundry.Evaluation.Experiments.ExperimentRetryDecision Decide(NexusLabs.Foundry.Evaluation.Experiments.ExperimentRetryContext context);
Parameters¶
context ExperimentRetryContext
The completed attempt and stable item identity.
Implements Decide(ExperimentRetryContext)
Returns¶
ExperimentRetryDecision
The retry decision.