Class CallbackOperation<T>

java.lang.Object
software.amazon.lambda.durable.operation.BaseDurableOperation<T>
software.amazon.lambda.durable.operation.CallbackOperation<T>
All Implemented Interfaces:
DurableCallbackFuture<T>, DurableFuture<T>

public class CallbackOperation<T> extends BaseDurableOperation<T> implements DurableCallbackFuture<T>
Durable operation for creating and waiting on external callbacks.
  • Constructor Details

  • Method Details

    • callbackId

      public String callbackId()
      Description copied from interface: DurableCallbackFuture
      Returns the unique identifier for this callback.

      External systems use this ID to send callback results back to the durable execution.

      Specified by:
      callbackId in interface DurableCallbackFuture<T>
      Returns:
      the callback ID
    • start

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

      protected void replay(software.amazon.awssdk.services.lambda.model.Operation existing)
      Replays the operation.
      Specified by:
      replay in class BaseDurableOperation<T>
    • 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