Interface StorageManagerProvider

All Known Implementing Classes:
DefaultStorageManagerProvider

public interface StorageManagerProvider
SPI to register custom StorageManager implementations
  • Field Details

  • Method Details

    • instance

      static StorageManagerProvider instance()
      Returns the currently registered StorageManagerProvider. Will attempt to instantiate one based on the ServiceLoader for StorageManagerProvider if it is not set. Will default to DefaultStorageManagerProvider otherwise.
      Returns:
      the currently registered StorageManagerProvider, lazily created.
    • register

      Registers and existing StorageManagerProvider
      Parameters:
      provider - the provider to register
      Returns:
      a registration object allowing you to unregister it
      Throws:
      IllegalStateException - when there already is a registered provider
    • getStorageManager

      default StorageManager getStorageManager()
      Returns:
      the current StorageManager, for the current TCCL
    • getStorageManager

      StorageManager getStorageManager(ClassLoader classloader)
      Obtain the StorageManager registered for the given ClassLoader
      Parameters:
      classloader - the classloader to use for looking up the StorageManager
      Returns:
      the StorageManager registered for the given ClassLoader