Package software.amazon.lambda.durable
Interface DurableFuture<T>
- All Known Subinterfaces:
DurableCallbackFuture<T>
- All Known Implementing Classes:
BaseDurableOperation,CallbackOperation,ChildContextOperation,InvokeOperation,StepOperation,WaitOperation
public interface DurableFuture<T>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>allOf(List<DurableFuture<T>> futures) Waits for all provided futures to complete and returns their results in order.static <T> List<T>allOf(DurableFuture<T>... futures) Waits for all provided futures to complete and returns their results in order.get()Blocks until the operation completes and returns the result.
-
Method Details
-
get
T get()Blocks 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
-
allOf
Waits for all provided futures to complete and returns their results in order.The futures are resolved sequentially, but since the underlying operations run concurrently, this effectively waits for all operations to complete. During replay, completed operations return immediately.
- Type Parameters:
T- the result type of the futures- Parameters:
futures- the futures to wait for- Returns:
- a list of results in the same order as the input futures
-
allOf
Waits for all provided futures to complete and returns their results in order.The futures are resolved sequentially, but since the underlying operations run concurrently, this effectively waits for all operations to complete. During replay, completed operations return immediately.
- Type Parameters:
T- the result type of the futures- Parameters:
futures- the list of futures to wait for- Returns:
- a list of results in the same order as the input futures
-