Class RetryableExecuteDelegate
java.lang.Object
io.axoniq.framework.workflow.runtime.execution.AbstractStepExecutor
io.axoniq.framework.workflow.runtime.execution.RetryableExecuteDelegate
- All Implemented Interfaces:
ExecutePrimitive
@Internal
public class RetryableExecuteDelegate
extends AbstractStepExecutor
implements ExecutePrimitive
Decorator that adds retry behavior to an
ExecuteDelegate.
For calls without a RetryPolicy (or with RetryPolicy.NONE), execution is delegated straight through.
When a retry policy is active, this primitive provides custom FailureHandler and TimeoutHandler
callbacks that evaluate the policy and schedule retry attempts.
- Since:
- 5.4.0
- Author:
- Stefan Dragisic
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.axoniq.framework.workflow.runtime.api.execution.context.ExecutePrimitive
ExecutePrimitive.ExecuteCommand -
Field Summary
Fields inherited from class io.axoniq.framework.workflow.runtime.execution.AbstractStepExecutor
clock, parentEventNameCustomizer, reachedSteps, runningSteps, timeoutScheduler, workflowExecution, workflowExecutionOperations -
Constructor Summary
ConstructorsConstructorDescriptionRetryableExecuteDelegate(ExecuteDelegate delegate, WorkflowExecutionOperations workflowExecutionOperations, WorkflowExecution workflowExecution, RunningSteps runningSteps, ReachedSteps reachedSteps, EventNameCustomizer parentEventNameCustomizer, Clock clock, WorkflowScheduler timeoutScheduler) Constructs the delegate. -
Method Summary
Modifier and TypeMethodDescriptionexecute(ExecutePrimitive.ExecuteCommand command) Execute primitive.Methods inherited from class io.axoniq.framework.workflow.runtime.execution.AbstractStepExecutor
acceptAllPendingTasksForStep, appendEvent, cancelled, cancelled, cancelledWaitForEvent, completed, completed, completedWaitForEvent, eventMessagePayload, failed, getContext, isCancellation, registerParkedStep, registerParkedStep, retrying, retryStarted, sanitize, started, startedWaitForEvent, stateBased, timedOut, timedOut, timedOutWaitForEvent, timedOutWaitForEvent, unwrapCancellation, unwrapCompletionException
-
Constructor Details
-
RetryableExecuteDelegate
@Internal public RetryableExecuteDelegate(ExecuteDelegate delegate, WorkflowExecutionOperations workflowExecutionOperations, WorkflowExecution workflowExecution, RunningSteps runningSteps, ReachedSteps reachedSteps, EventNameCustomizer parentEventNameCustomizer, Clock clock, WorkflowScheduler timeoutScheduler) Constructs the delegate.- Parameters:
delegate- executoion delegate.workflowExecutionOperations- runtime primitive-operation surfaceworkflowExecution- workflow execution.runningSteps- running step registryreachedSteps- reached steps trackerparentEventNameCustomizer- parent event name customizer.clock- clock for time calculations.timeoutScheduler- scheduler for workflow step timeouts
-
-
Method Details
-
execute
Description copied from interface:ExecutePrimitiveExecute primitive.- Specified by:
executein interfaceExecutePrimitive- Parameters:
command- command object for the primitive.- Returns:
- durable result handle.
-