Class WaitForConditionExample
java.lang.Object
software.amazon.lambda.durable.DurableHandler<Integer,Integer>
software.amazon.lambda.durable.examples.wait.WaitForConditionExample
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
Example demonstrating the waitForCondition operation.
This handler polls a condition function until it signals completion:
- The attempt count is used as a state (replay safe)
- Fails and retries until the attempt count reaches the given threshold, and then succeeds
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandleRequest(Integer threshold, DurableContext context) Handle the durable execution.Methods inherited from class software.amazon.lambda.durable.DurableHandler
createConfiguration, getConfiguration, handleRequest
-
Constructor Details
-
WaitForConditionExample
public WaitForConditionExample()
-
-
Method Details
-
handleRequest
Description copied from class:DurableHandlerHandle the durable execution.- Specified by:
handleRequestin classDurableHandler<Integer,Integer> - Parameters:
threshold- User inputcontext- Durable context for operations- Returns:
- Result
-