Class WaitAsyncExample

java.lang.Object
software.amazon.lambda.durable.DurableHandler<GreetingRequest,String>
software.amazon.lambda.durable.examples.WaitAsyncExample
All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler

public class WaitAsyncExample extends DurableHandler<GreetingRequest,String>
Example demonstrating non-blocking wait with waitAsync().

This handler starts a wait and a step concurrently, then collects both results. The wait acts as a minimum duration guarantee — the step runs in parallel, and the handler only proceeds once both the step completes and the wait elapses.

  1. Start a 5-second async wait (non-blocking)
  2. Start an async step concurrently
  3. Collect both results — ensures at least 5 seconds have passed