All Classes and Interfaces
Class
Description
Persistence layer that will store the idempotency result.
Data Class for idempotency records.
Status of the record:
INPROGRESS: record initialized when function starts
COMPLETED: record updated with the result of the function when it ends
EXPIRED: record expired, idempotency will not happen
Holds the configuration for idempotency:
The persistence layer to use for persisting the request and response of the function (mandatory).
The general configuration for idempotency (optional, see
Use it before the function handler (
IdempotencyConfig.Builder methods to see defaults values.
Use it before the function handler (
RequestHandler.handleRequest(Object, Context))
get called.This exception is thrown when the same payload is sent
while the previous one was not yet fully stored in the persistence layer (marked as COMPLETED).
Configuration of the idempotency feature.
Exception thrown when Idempotency is not well configured:
An annotated method does not return anything
An annotated method does not have parameters or more than one without
the
IdempotencyKey annotation
Internal class that will handle the Idempotency, and use the
PersistenceStore
to store the result of previous calls.IdempotencyInconsistentStateException can happen under rare but expected cases
when persistent state changes in the small-time between put & get requests.
Exception thrown when trying to store an item which already exists.
Exception thrown when the item was not found in the persistence store.
@IdempotencyKey is used to signal that a method parameter is used as a key for idempotency.
Must be used in conjunction with the @Idempotency annotation.
Example:
Must be used in conjunction with the @Idempotency annotation.
Example:
Exception thrown only when using
IdempotencyConfig.throwOnNoIdempotencyKey(),
and if a key could not be found in the event (for example when having a bad JMESPath configured)Exception thrown when a technical error occurred with the persistence layer (eg. insertion, deletion, ... in database)
Exception thrown only when using
IdempotencyConfig.getPayloadValidationJMESPath() is configured
and the payload changed between two calls (but with the same idempotency key).@Idempotent is used to signal that the annotated method is idempotent:
Calling this method one or multiple times with the same parameter will always return the same result.
This annotation can be placed on the
Calling this method one or multiple times with the same parameter will always return the same result.
This annotation can be placed on the
RequestHandler.handleRequest(Object, Context)
method of a Lambda function:Aspect that handles the
Idempotent annotation.Implementation of a simple LRU Cache based on a
LinkedHashMap
See here.Persistence layer that will store the idempotency result.