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, isVirtual, parentOperation, replayCompletedOperation -
Constructor Summary
ConstructorsConstructorDescriptionWaitOperation(OperationIdentifier operationIdentifier, Duration duration, DurableContextImpl durableContext) -
Method Summary
Methods inherited from class software.amazon.lambda.durable.operation.BaseDurableOperation
deregisterActiveThread, execute, extractErrorFromOperation, fireOnOperationEnd, getChildOperations, getCompletionFuture, getContext, getCurrentThreadContext, getErrorObject, getName, getOperation, getOperationId, getRunningUserHandler, getSubType, getType, interruptRunningUserHandler, isOperationCompleted, isRunningUserHandlerOwner, markAlreadyCompleted, onCheckpointComplete, pollForOperationUpdates, pollForOperationUpdates, processCheckpointUpdate, registerActiveThread, runUserFunction, runUserHandler, sendOperationUpdate, sendOperationUpdateAsync, terminateExecution, terminateExecutionWithIllegalDurableOperationException, validateReplay, waitForFirstOperationCompletion, 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
-