Class InvokeOperation<T,U>
java.lang.Object
software.amazon.lambda.durable.operation.BaseDurableOperation<T>
software.amazon.lambda.durable.operation.InvokeOperation<T,U>
- All Implemented Interfaces:
DurableFuture<T>
-
Field Summary
Fields inherited from class software.amazon.lambda.durable.operation.BaseDurableOperation
completionFuture -
Constructor Summary
ConstructorsConstructorDescriptionInvokeOperation(String operationId, String name, String functionName, U payload, TypeToken<T> resultTypeToken, InvokeConfig config, ExecutionManager executionManager) Convenience constructor for root-context operations where parentId is null.InvokeOperation(String operationId, String name, String functionName, U payload, TypeToken<T> resultTypeToken, InvokeConfig config, ExecutionManager executionManager, String parentId) -
Method Summary
Methods inherited from class software.amazon.lambda.durable.operation.BaseDurableOperation
deregisterActiveThread, deserializeException, deserializeResult, getCurrentThreadContext, getName, getOperation, getOperationId, getParentId, getType, isOperationCompleted, markAlreadyCompleted, onCheckpointComplete, pollForOperationUpdates, pollForOperationUpdates, registerActiveThread, sendOperationUpdate, sendOperationUpdateAsync, serializeException, serializeResult, setCurrentThreadContext, terminateExecution, terminateExecutionWithIllegalDurableOperationException, validateReplay, waitForOperationCompletion
-
Constructor Details
-
InvokeOperation
public InvokeOperation(String operationId, String name, String functionName, U payload, TypeToken<T> resultTypeToken, InvokeConfig config, ExecutionManager executionManager, String parentId) -
InvokeOperation
public InvokeOperation(String operationId, String name, String functionName, U payload, TypeToken<T> resultTypeToken, InvokeConfig config, ExecutionManager executionManager) Convenience constructor for root-context operations where parentId is null.
-
-
Method Details
-
execute
public void execute()Starts the operation. Returns immediately after starting background work or checkpointing. Does not block.- Specified by:
executein classBaseDurableOperation<T>
-
get
Blocks until the operation completes and returns the result.- Returns:
- the operation result
-