Class StepOperation<T>
java.lang.Object
software.amazon.lambda.durable.operation.BaseDurableOperation<T>
software.amazon.lambda.durable.operation.StepOperation<T>
- All Implemented Interfaces:
DurableFuture<T>
-
Field Summary
Fields inherited from class software.amazon.lambda.durable.operation.BaseDurableOperation
completionFuture -
Constructor Summary
ConstructorsConstructorDescriptionStepOperation(String operationId, String name, Supplier<T> function, TypeToken<T> resultTypeToken, StepConfig config, ExecutionManager executionManager, DurableLogger durableLogger, DurableConfig durableConfig) Convenience constructor for root-context operations where parentId is null.StepOperation(String operationId, String name, Supplier<T> function, TypeToken<T> resultTypeToken, StepConfig config, ExecutionManager executionManager, DurableLogger durableLogger, DurableConfig durableConfig, 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
-
StepOperation
public StepOperation(String operationId, String name, Supplier<T> function, TypeToken<T> resultTypeToken, StepConfig config, ExecutionManager executionManager, DurableLogger durableLogger, DurableConfig durableConfig, String parentId) -
StepOperation
public StepOperation(String operationId, String name, Supplier<T> function, TypeToken<T> resultTypeToken, StepConfig config, ExecutionManager executionManager, DurableLogger durableLogger, DurableConfig durableConfig) Convenience constructor for root-context operations where parentId is null.
-
-
Method Details
-
execute
public void execute()Description copied from class:BaseDurableOperationStarts the operation. Returns immediately after starting background work or checkpointing. Does not block.- Specified by:
executein classBaseDurableOperation<T>
-
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
- Returns:
- the operation result
-