Class 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 Detail

      • ProviderStore

        public ProviderStore()
    • Method Detail

      • 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.
      • 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.
      • 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.