Class StepOperation<T>
java.lang.Object
software.amazon.lambda.durable.operation.BaseDurableOperation
software.amazon.lambda.durable.operation.SerializableDurableOperation<T>
software.amazon.lambda.durable.operation.StepOperation<T>
- Type Parameters:
T- the result type of the step function
- All Implemented Interfaces:
DurableFuture<T>
Durable operation that executes a user-provided function with retry support.
Steps are the primary unit of work in a durable execution. Each step is checkpointed before and after execution, enabling automatic retry on failure and replay on re-invocation.
-
Field Summary
Fields inherited from class software.amazon.lambda.durable.operation.BaseDurableOperation
completionFuture, executionManager, parentOperation -
Constructor Summary
ConstructorsConstructorDescriptionStepOperation(OperationIdentifier operationIdentifier, Function<StepContext, T> function, TypeToken<T> resultTypeToken, StepConfig config, DurableContextImpl durableContext) -
Method Summary
Methods inherited from class software.amazon.lambda.durable.operation.SerializableDurableOperation
deserializeException, deserializeResult, serializeException, serializeResultMethods inherited from class software.amazon.lambda.durable.operation.BaseDurableOperation
execute, getChildOperations, getCompletionFuture, getContext, getCurrentThreadContext, getName, getOperation, getOperationId, getSubType, getType, isOperationCompleted, markAlreadyCompleted, onCheckpointComplete, pollForOperationUpdates, pollForOperationUpdates, registerActiveThread, runUserHandler, sendOperationUpdate, sendOperationUpdateAsync, terminateExecution, terminateExecutionWithIllegalDurableOperationException, validateReplay, waitForOperationCompletion
-
Constructor Details
-
StepOperation
public StepOperation(OperationIdentifier operationIdentifier, Function<StepContext, T> function, TypeToken<T> resultTypeToken, StepConfig config, DurableContextImpl durableContext)
-
-
Method Details
-
start
protected void start()Starts the operation.- Specified by:
startin classBaseDurableOperation
-
replay
protected void replay(software.amazon.awssdk.services.lambda.model.Operation existing) Replays the operation.- Specified by:
replayin classBaseDurableOperation- Parameters:
existing- the checkpointed operation state
-
get
Description copied from interface:DurableFutureBlocks until the operation completes and returns the result.This delegates to operation.get() which handles: - Thread deregistration (allows suspension) - Thread reactivation (resumes execution) - Result retrieval
- Specified by:
getin interfaceDurableFuture<T>- Specified by:
getin classSerializableDurableOperation<T>- Returns:
- the operation result
-