Class DynamoDbMetadataStore
java.lang.Object
org.springframework.integration.aws.metadata.DynamoDbMetadataStore
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,org.springframework.integration.metadata.ConcurrentMetadataStore
,org.springframework.integration.metadata.MetadataStore
public class DynamoDbMetadataStore
extends Object
implements org.springframework.integration.metadata.ConcurrentMetadataStore, org.springframework.beans.factory.InitializingBean
The
ConcurrentMetadataStore
for the DynamoDbAsyncClient
.- Since:
- 1.1
- Author:
- Artem Bilan, Asiel Caballero
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The "SpringIntegrationMetadataStore" default name for the metadata table in the DynamoDB.static final String
The "metadataKey" as a default name for partition key in the table.static final String
The "expireAt" as a default name for time-to-live attribute.static final String
The "metadataValue" as a default name for value attribute. -
Constructor Summary
ConstructorsConstructorDescriptionDynamoDbMetadataStore
(software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient dynamoDB) DynamoDbMetadataStore
(software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient dynamoDB, String tableName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
putIfAbsent
(String key, String value) boolean
void
setBillingMode
(software.amazon.awssdk.services.dynamodb.model.BillingMode billingMode) void
setCreateTableDelay
(int createTableDelay) void
setCreateTableRetries
(int createTableRetries) void
setReadCapacity
(long readCapacity) void
setTimeToLive
(int timeToLive) Configure a period in seconds for items expiration.void
setWriteCapacity
(long writeCapacity) toString()
-
Field Details
-
DEFAULT_TABLE_NAME
The "SpringIntegrationMetadataStore" default name for the metadata table in the DynamoDB.- See Also:
-
KEY
The "metadataKey" as a default name for partition key in the table.- See Also:
-
VALUE
The "metadataValue" as a default name for value attribute.- See Also:
-
TTL
The "expireAt" as a default name for time-to-live attribute.- See Also:
-
-
Constructor Details
-
DynamoDbMetadataStore
public DynamoDbMetadataStore(software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient dynamoDB) -
DynamoDbMetadataStore
public DynamoDbMetadataStore(software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient dynamoDB, String tableName)
-
-
Method Details
-
setCreateTableRetries
public void setCreateTableRetries(int createTableRetries) -
setCreateTableDelay
public void setCreateTableDelay(int createTableDelay) -
setBillingMode
public void setBillingMode(software.amazon.awssdk.services.dynamodb.model.BillingMode billingMode) -
setReadCapacity
public void setReadCapacity(long readCapacity) -
setWriteCapacity
public void setWriteCapacity(long writeCapacity) -
setTimeToLive
public void setTimeToLive(int timeToLive) Configure a period in seconds for items expiration. If it is configured to non-positive value (<= 0
), the TTL is disabled on the table.- Parameters:
timeToLive
- period in seconds for items expiration.- Since:
- 2.0
- See Also:
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
put
- Specified by:
put
in interfaceorg.springframework.integration.metadata.MetadataStore
-
get
- Specified by:
get
in interfaceorg.springframework.integration.metadata.MetadataStore
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceorg.springframework.integration.metadata.ConcurrentMetadataStore
-
replace
- Specified by:
replace
in interfaceorg.springframework.integration.metadata.ConcurrentMetadataStore
-
remove
- Specified by:
remove
in interfaceorg.springframework.integration.metadata.MetadataStore
-
toString
-