Class DataRecord
java.lang.Object
software.amazon.lambda.powertools.idempotency.persistence.DataRecord
Data Class for idempotency records. This is actually the item that will be stored in the persistence layer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStatus 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 -
Constructor Summary
ConstructorsConstructorDescriptionDataRecord(String idempotencyKey, DataRecord.Status status, long expiryTimestamp, String responseData, String payloadHash) DataRecord(String idempotencyKey, DataRecord.Status status, long expiryTimestamp, String responseData, String payloadHash, OptionalLong inProgressExpiryTimestamp) -
Method Summary
Modifier and TypeMethodDescriptionbooleanlonginthashCode()booleanCheck if data record is expired (based on expiration configured in theIdempotencyConfig)toString()
-
Constructor Details
-
DataRecord
public DataRecord(String idempotencyKey, DataRecord.Status status, long expiryTimestamp, String responseData, String payloadHash) -
DataRecord
public DataRecord(String idempotencyKey, DataRecord.Status status, long expiryTimestamp, String responseData, String payloadHash, OptionalLong inProgressExpiryTimestamp)
-
-
Method Details
-
getIdempotencyKey
-
isExpired
Check if data record is expired (based on expiration configured in theIdempotencyConfig)- Returns:
- Whether the record is currently expired or not
-
getStatus
-
getExpiryTimestamp
public long getExpiryTimestamp() -
getInProgressExpiryTimestamp
-
getResponseData
-
getPayloadHash
-
equals
-
hashCode
public int hashCode() -
toString
-