Package javax.cache

Interface CacheManagerFactory

All Known Implementing Classes:
CacheManagerFactoryImpl

public interface CacheManagerFactory
Manages CacheManager instances.

It is invoked by the Caching class to create a CacheManager

Since:
1.0
Author:
Yannis Cosmadopoulos
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Reclaims all resources obtained from this factory.
    boolean
    close(ClassLoader classLoader)
    Reclaims all resources for a ClassLoader from this factory.
    boolean
    close(ClassLoader classLoader, String name)
    Reclaims all resources for a ClassLoader from this factory.
    getCacheManager(ClassLoader classLoader, String name)
    Get the cache manager for the specified name and class loader.
    Get a named cache manager using the default cache loader as specified by the implementation.
  • Method Details

    • getCacheManager

      CacheManager getCacheManager(String name)
      Get a named cache manager using the default cache loader as specified by the implementation.
      Parameters:
      name - the name of the cache manager
      Returns:
      the named cache manager
      Throws:
      NullPointerException - if name is null
    • getCacheManager

      CacheManager getCacheManager(ClassLoader classLoader, String name)
      Get the cache manager for the specified name and class loader.

      If there is no cache manager associated, it is created.

      Parameters:
      classLoader - associated with the cache manager.
      name - the name of the cache manager
      Returns:
      the new cache manager
      Throws:
      NullPointerException - if classLoader or name is null
    • close

      void close() throws CachingShutdownException
      Reclaims all resources obtained from this factory.

      All cache managers obtained from the factory are shutdown.

      Subsequent requests from this factory will return different cache managers than would have been obtained before shutdown.

      Throws:
      CachingShutdownException - if any of the individual shutdowns failed
    • close

      boolean close(ClassLoader classLoader) throws CachingShutdownException
      Reclaims all resources for a ClassLoader from this factory.

      All cache managers linked to the specified CacheLoader obtained from the factory are shutdown.

      Parameters:
      classLoader - the class loader for which managers will be shut down
      Returns:
      true if found, false otherwise
      Throws:
      CachingShutdownException - if any of the individual shutdowns failed
    • close

      boolean close(ClassLoader classLoader, String name) throws CachingShutdownException
      Reclaims all resources for a ClassLoader from this factory.

      the named cache manager obtained from the factory is shutdown.

      Parameters:
      classLoader - the class loader for which managers will be shut down
      name - the name of the cache manager
      Returns:
      true if found, false otherwise
      Throws:
      CachingShutdownException - if there is a problem shutting down a CacheManager