Class CompletedDurableFuture<T>

java.lang.Object
software.amazon.lambda.durable.util.CompletedDurableFuture<T>
Type Parameters:
T - the result type
All Implemented Interfaces:
DurableFuture<T>

public class CompletedDurableFuture<T> extends Object implements DurableFuture<T>
A DurableFuture that is already completed with a value.

Used for short-circuit cases (e.g., empty collection in map) where no checkpoint or async execution is needed.

  • Constructor Details

    • CompletedDurableFuture

      public CompletedDurableFuture(T value)
  • Method Details

    • get

      public T get()
      Description copied from interface: DurableFuture
      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

      Specified by:
      get in interface DurableFuture<T>
      Returns:
      the operation result