Class WaitOperation
java.lang.Object
software.amazon.lambda.durable.operation.BaseDurableOperation
software.amazon.lambda.durable.operation.WaitOperation
- All Implemented Interfaces:
DurableFuture<Void>
Durable operation that suspends execution for a specified duration without consuming compute.
The wait is checkpointed and the Lambda is suspended. On re-invocation after the wait period, execution resumes from where it left off.
-
Field Summary
Fields inherited from class software.amazon.lambda.durable.operation.BaseDurableOperation
completionFuture, executionManager, parentOperation -
Constructor Summary
ConstructorsConstructorDescriptionWaitOperation(OperationIdentifier operationIdentifier, Duration duration, DurableContextImpl durableContext) -
Method Summary
Methods 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
-
WaitOperation
public WaitOperation(OperationIdentifier operationIdentifier, Duration duration, 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<Void>- Returns:
- the operation result
-