Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- around(ProceedingJoinPoint, Idempotent) - Method in class software.amazon.lambda.powertools.idempotency.internal.IdempotentAspect
B
- BasePersistenceStore - Class in software.amazon.lambda.powertools.idempotency.persistence
-
Persistence layer that will store the idempotency result.
- BasePersistenceStore() - Constructor for class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
- build() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
- builder() - Static method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
-
Create a builder that can be used to configure and create a
IdempotencyConfig. - Builder() - Constructor for class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
C
- callAt(Idempotent) - Method in class software.amazon.lambda.powertools.idempotency.internal.IdempotentAspect
- COMPLETED - Enum constant in enum software.amazon.lambda.powertools.idempotency.persistence.DataRecord.Status
- config() - Static method in class software.amazon.lambda.powertools.idempotency.Idempotency
-
Acts like a builder that can be used to configure
Idempotency - Config() - Constructor for class software.amazon.lambda.powertools.idempotency.Idempotency.Config
- configure() - Method in class software.amazon.lambda.powertools.idempotency.Idempotency.Config
-
Use this method after configuring persistence layer (mandatory) and idem potency configuration (optional)
- configure(IdempotencyConfig, String) - Method in class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
-
Initialize the base persistence layer from the configuration settings
- Constants - Class in software.amazon.lambda.powertools.idempotency
- Constants() - Constructor for class software.amazon.lambda.powertools.idempotency.Constants
D
- DataRecord - Class in software.amazon.lambda.powertools.idempotency.persistence
-
Data Class for idempotency records.
- DataRecord(String, DataRecord.Status, long, String, String) - Constructor for class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
- DataRecord(String, DataRecord.Status, long, String, String, OptionalLong) - Constructor for class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
- DataRecord.Status - Enum in software.amazon.lambda.powertools.idempotency.persistence
-
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
- deleteRecord(JsonNode, Throwable) - Method in class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
-
Delete record from the persistence store
- deleteRecord(String) - Method in interface software.amazon.lambda.powertools.idempotency.persistence.PersistenceStore
-
Remove item from persistence store
E
- equals(Object) - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
- EXPIRED - Enum constant in enum software.amazon.lambda.powertools.idempotency.persistence.DataRecord.Status
G
- getConfig() - Method in class software.amazon.lambda.powertools.idempotency.Idempotency
- getDataRecord() - Method in exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyItemAlreadyExistsException
- getEventKeyJMESPath() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- getExpirationInSeconds() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- getExpiryTimestamp() - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
- getHashFunction() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- getIdempotencyKey() - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
- getInProgressExpiryTimestamp() - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
- getInstance() - Static method in class software.amazon.lambda.powertools.idempotency.Idempotency
- getLambdaContext() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- getLocalCacheMaxItems() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- getPayloadHash() - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
- getPayloadValidationJMESPath() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- getPersistenceStore() - Method in class software.amazon.lambda.powertools.idempotency.Idempotency
- getRecord(JsonNode, Instant) - Method in class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
-
Retrieve idempotency key for data provided, fetch from persistence store, and convert to DataRecord.
- getRecord(String) - Method in interface software.amazon.lambda.powertools.idempotency.persistence.PersistenceStore
-
Retrieve item from persistence store using idempotency key and return it as a DataRecord instance.
- getResponseData() - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
- getResponseHook() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- getStatus() - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
H
- handle() - Method in class software.amazon.lambda.powertools.idempotency.internal.IdempotencyHandler
-
Main entry point for handling idempotent execution of a function.
- hashCode() - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
I
- Idempotency - Class in software.amazon.lambda.powertools.idempotency
-
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
IdempotencyConfig.Buildermethods to see defaults values.
Use it before the function handler (RequestHandler.handleRequest(Object, Context)) get called. - IDEMPOTENCY_DISABLED_ENV - Static variable in class software.amazon.lambda.powertools.idempotency.Constants
- Idempotency.Config - Class in software.amazon.lambda.powertools.idempotency
- IdempotencyAlreadyInProgressException - Exception Class in software.amazon.lambda.powertools.idempotency.exceptions
-
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).
- IdempotencyAlreadyInProgressException(String) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyAlreadyInProgressException
- IdempotencyConfig - Class in software.amazon.lambda.powertools.idempotency
-
Configuration of the idempotency feature.
- IdempotencyConfig.Builder - Class in software.amazon.lambda.powertools.idempotency
- IdempotencyConfigurationException - Exception Class in software.amazon.lambda.powertools.idempotency.exceptions
-
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
IdempotencyKeyannotation - IdempotencyConfigurationException(String) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyConfigurationException
- IdempotencyHandler - Class in software.amazon.lambda.powertools.idempotency.internal
-
Internal class that will handle the Idempotency, and use the
PersistenceStoreto store the result of previous calls. - IdempotencyHandler(ProceedingJoinPoint, String, JsonNode, Context) - Constructor for class software.amazon.lambda.powertools.idempotency.internal.IdempotencyHandler
- IdempotencyInconsistentStateException - Exception Class in software.amazon.lambda.powertools.idempotency.exceptions
-
IdempotencyInconsistentStateException can happen under rare but expected cases when persistent state changes in the small-time between put & get requests.
- IdempotencyInconsistentStateException(String) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyInconsistentStateException
- IdempotencyInconsistentStateException(String, Exception) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyInconsistentStateException
- IdempotencyItemAlreadyExistsException - Exception Class in software.amazon.lambda.powertools.idempotency.exceptions
-
Exception thrown when trying to store an item which already exists.
- IdempotencyItemAlreadyExistsException() - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyItemAlreadyExistsException
- IdempotencyItemAlreadyExistsException(String, Throwable) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyItemAlreadyExistsException
- IdempotencyItemAlreadyExistsException(String, Throwable, DataRecord) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyItemAlreadyExistsException
- IdempotencyItemNotFoundException - Exception Class in software.amazon.lambda.powertools.idempotency.exceptions
-
Exception thrown when the item was not found in the persistence store.
- IdempotencyItemNotFoundException(String) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyItemNotFoundException
- IdempotencyKey - Annotation Type in software.amazon.lambda.powertools.idempotency
-
@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: - IdempotencyKeyException - Exception Class in software.amazon.lambda.powertools.idempotency.exceptions
-
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) - IdempotencyKeyException(String) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyKeyException
- IdempotencyPersistenceLayerException - Exception Class in software.amazon.lambda.powertools.idempotency.exceptions
-
Exception thrown when a technical error occurred with the persistence layer (eg. insertion, deletion, ... in database)
- IdempotencyPersistenceLayerException(String, Exception) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyPersistenceLayerException
- IdempotencyValidationException - Exception Class in software.amazon.lambda.powertools.idempotency.exceptions
-
Exception thrown only when using
IdempotencyConfig.getPayloadValidationJMESPath()is configured and the payload changed between two calls (but with the same idempotency key). - IdempotencyValidationException() - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyValidationException
- IdempotencyValidationException(String) - Constructor for exception class software.amazon.lambda.powertools.idempotency.exceptions.IdempotencyValidationException
- Idempotent - Annotation Type in software.amazon.lambda.powertools.idempotency
-
@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 theRequestHandler.handleRequest(Object, Context)method of a Lambda function: - IdempotentAspect - Class in software.amazon.lambda.powertools.idempotency.internal
-
Aspect that handles the
Idempotentannotation. - IdempotentAspect() - Constructor for class software.amazon.lambda.powertools.idempotency.internal.IdempotentAspect
- INPROGRESS - Enum constant in enum software.amazon.lambda.powertools.idempotency.persistence.DataRecord.Status
- isExpired(Instant) - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
-
Check if data record is expired (based on expiration configured in the
IdempotencyConfig)
L
- LRUCache<K,
V> - Class in software.amazon.lambda.powertools.idempotency.internal.cache -
Implementation of a simple LRU Cache based on a
LinkedHashMapSee here. - LRUCache(int) - Constructor for class software.amazon.lambda.powertools.idempotency.internal.cache.LRUCache
P
- payloadValidationEnabled - Variable in class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
- PersistenceStore - Interface in software.amazon.lambda.powertools.idempotency.persistence
-
Persistence layer that will store the idempotency result.
- putRecord(DataRecord, Instant) - Method in interface software.amazon.lambda.powertools.idempotency.persistence.PersistenceStore
-
Add a DataRecord to persistence store if it does not already exist with that key
R
- registerLambdaContext(Context) - Static method in class software.amazon.lambda.powertools.idempotency.Idempotency
-
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.
- removeEldestEntry(Map.Entry) - Method in class software.amazon.lambda.powertools.idempotency.internal.cache.LRUCache
S
- saveInProgress(JsonNode, Instant, OptionalInt) - Method in class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
-
Save record of function's execution being in progress
- saveSuccess(JsonNode, Object, Instant) - Method in class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
-
Save record of function's execution completing successfully
- setLambdaContext(Context) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- software.amazon.lambda.powertools.idempotency - package software.amazon.lambda.powertools.idempotency
- software.amazon.lambda.powertools.idempotency.exceptions - package software.amazon.lambda.powertools.idempotency.exceptions
- software.amazon.lambda.powertools.idempotency.internal - package software.amazon.lambda.powertools.idempotency.internal
- software.amazon.lambda.powertools.idempotency.internal.cache - package software.amazon.lambda.powertools.idempotency.internal.cache
- software.amazon.lambda.powertools.idempotency.persistence - package software.amazon.lambda.powertools.idempotency.persistence
T
- throwOnNoIdempotencyKey() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
- toString() - Method in enum software.amazon.lambda.powertools.idempotency.persistence.DataRecord.Status
- toString() - Method in class software.amazon.lambda.powertools.idempotency.persistence.DataRecord
U
- updateRecord(DataRecord) - Method in interface software.amazon.lambda.powertools.idempotency.persistence.PersistenceStore
-
Update item in persistence store
- useLocalCache() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig
V
- valueOf(String) - Static method in enum software.amazon.lambda.powertools.idempotency.persistence.DataRecord.Status
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum software.amazon.lambda.powertools.idempotency.persistence.DataRecord.Status
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- withConfig(IdempotencyConfig) - Method in class software.amazon.lambda.powertools.idempotency.Idempotency.Config
- withEventKeyJMESPath(String) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
A JMESPath expression to extract the idempotency key from the event record.
- withExpiration(Duration) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
The number of seconds to wait before a record is expired
- withHashFunction(String) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
Function to use for calculating hashes, by default MD5.
- withLocalCacheMaxItems(int) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
Set the maximum number of items to store in local cache, by default 256
- withPayloadValidationJMESPath(String) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
A JMESPath expression to extract the payload to be validated from the event record.
- withPersistenceStore(BasePersistenceStore) - Method in class software.amazon.lambda.powertools.idempotency.Idempotency.Config
- withResponseHook(BiFunction<Object, DataRecord, Object>) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
Response hook that will be called for each idempotent response.
- withThrowOnNoIdempotencyKey() - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
Throw an exception if no idempotency key was found in the request.
- withThrowOnNoIdempotencyKey(boolean) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
Whether to throw an exception if no idempotency key was found in the request, by default false
- withUseLocalCache(boolean) - Method in class software.amazon.lambda.powertools.idempotency.IdempotencyConfig.Builder
-
Whether to locally cache idempotency results, by default false
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form