Class WaitOperation

java.lang.Object
software.amazon.lambda.durable.operation.BaseDurableOperation
software.amazon.lambda.durable.operation.WaitOperation
All Implemented Interfaces:
DurableFuture<Void>

public class WaitOperation extends BaseDurableOperation implements 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.

  • Constructor Details

  • Method Details

    • start

      protected void start()
      Starts the operation.
      Specified by:
      start in class BaseDurableOperation
    • replay

      protected void replay(software.amazon.awssdk.services.lambda.model.Operation existing)
      Replays the operation.
      Specified by:
      replay in class BaseDurableOperation
      Parameters:
      existing - the checkpointed operation state
    • get

      public Void 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<Void>
      Returns:
      the operation result