java.lang.Object
com.amazonaws.services.dynamodbv2.datamodeling.encryption.providers.store.ProviderStore
Direct Known Subclasses:
MetaStore

public abstract class ProviderStore extends Object
Provides a standard way to retrieve and optionally create EncryptionMaterialsProviders backed by some form of persistent storage.
Author:
rubin
  • Constructor Details

    • ProviderStore

      public ProviderStore()
  • Method Details

    • getProvider

      public EncryptionMaterialsProvider getProvider(String materialName)
      Returns the most recent provider with the specified name. If there are no providers with this name, it will create one with version 0.
    • getProvider

      public abstract EncryptionMaterialsProvider getProvider(String materialName, long version)
      Returns the provider with the specified name and version.
      Throws:
      IndexOutOfBoundsException - if version is not a valid version
    • newProvider

      public EncryptionMaterialsProvider newProvider(String materialName)
      Creates a new provider with a version one greater than the current max version. If multiple clients attempt to create a provider with this same version simultaneously, they will properly coordinate and the result will be that a single provider is created and that all ProviderStores return the same one.
    • getOrCreate

      public EncryptionMaterialsProvider getOrCreate(String materialName, long nextId)
      Returns the provider with the specified name and version and creates it if it doesn't exist.
      Throws:
      UnsupportedOperationException - if a new provider cannot be created
    • getMaxVersion

      public abstract long getMaxVersion(String materialName)
      Returns the maximum version number associated with materialName. If there are no versions, returns -1.
    • getVersionFromMaterialDescription

      public abstract long getVersionFromMaterialDescription(Map<String,String> description)
      Extracts the material version from description.