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 Details

    • DEFAULT_TABLE_NAME

      public static final String DEFAULT_TABLE_NAME
      The "SpringIntegrationMetadataStore" default name for the metadata table in the DynamoDB.
      See Also:
    • KEY

      public static final String KEY
      The "metadataKey" as a default name for partition key in the table.
      See Also:
    • VALUE

      public static final String VALUE
      The "metadataValue" as a default name for value attribute.
      See Also:
    • TTL

      public static final String 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 interface org.springframework.beans.factory.InitializingBean
    • put

      public void put(String key, String value)
      Specified by:
      put in interface org.springframework.integration.metadata.MetadataStore
    • get

      public String get(String key)
      Specified by:
      get in interface org.springframework.integration.metadata.MetadataStore
    • putIfAbsent

      public String putIfAbsent(String key, String value)
      Specified by:
      putIfAbsent in interface org.springframework.integration.metadata.ConcurrentMetadataStore
    • replace

      public boolean replace(String key, String oldValue, String newValue)
      Specified by:
      replace in interface org.springframework.integration.metadata.ConcurrentMetadataStore
    • remove

      public String remove(String key)
      Specified by:
      remove in interface org.springframework.integration.metadata.MetadataStore
    • toString

      public String toString()
      Overrides:
      toString in class Object