public final class DynamoDbPersistenceAdapter extends Object implements PersistenceAdapter
| Modifier and Type | Class and Description |
|---|---|
static class |
DynamoDbPersistenceAdapter.Builder
Static builder class to build an instance of
DynamoDbPersistenceAdapter. |
| Modifier and Type | Method and Description |
|---|---|
static DynamoDbPersistenceAdapter.Builder |
builder()
Static method to build an instance of Builder.
|
void |
deleteAttributes(RequestEnvelope envelope)
Deletes attributes from DynamoDB table.
|
Optional<Map<String,Object>> |
getAttributes(RequestEnvelope envelope)
Gets attributes from DynamoDB table.
|
void |
saveAttributes(RequestEnvelope envelope,
Map<String,Object> attributes)
Saves attributes to a DynamoDB table.
|
public static DynamoDbPersistenceAdapter.Builder builder()
DynamoDbPersistenceAdapter.Builder.public Optional<Map<String,Object>> getAttributes(RequestEnvelope envelope) throws PersistenceException
getAttributes in interface PersistenceAdapterenvelope - instance of RequestEnvelope.Map of String, Object if attributes exist, or an empty Optional if not.PersistenceException - if table doesn't exist or attributes retrieval fails.public void saveAttributes(RequestEnvelope envelope, Map<String,Object> attributes) throws PersistenceException
saveAttributes in interface PersistenceAdapterenvelope - instance of RequestEnvelope.attributes - to be stored in the table.PersistenceException - if table doesn't exist or save attributes operation fails.public void deleteAttributes(RequestEnvelope envelope) throws PersistenceException
deleteAttributes in interface PersistenceAdapterenvelope - instance of RequestEnvelope.PersistenceException - if table doesn't exist or save attributes operation fails.Copyright © 2023. All rights reserved.