Class Idempotency
java.lang.Object
software.amazon.lambda.powertools.idempotency.Idempotency
Holds the configuration for idempotency:
Use it before the function handler (
Example:
- The persistence layer to use for persisting the request and response of the function (mandatory).
- The general configuration for idempotency (optional, see
IdempotencyConfig.Buildermethods to see defaults values.
Use it before the function handler (
RequestHandler.handleRequest(Object, Context))
get called.
Example:
Idempotency.config().withPersistenceStore(...).configure();
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Idempotency.Configconfig()Acts like a builder that can be used to configureIdempotencystatic Idempotencystatic voidregisterLambdaContext(com.amazonaws.services.lambda.runtime.Context lambdaContext) Can be used in a method which is not the handler to capture the Lambda context, to calculate the remaining time before the invocation times out.
-
Method Details
-
getInstance
-
registerLambdaContext
public static void registerLambdaContext(com.amazonaws.services.lambda.runtime.Context lambdaContext) Can be used in a method which is not the handler to capture the Lambda context, to calculate the remaining time before the invocation times out.- Parameters:
lambdaContext-
-
config
Acts like a builder that can be used to configureIdempotency- Returns:
- a new instance of
Idempotency.Config
-
getConfig
-
getPersistenceStore
-