de.smartics.properties.spi.config.cache
Class CacheManagerFactory

Package class diagram package CacheManagerFactory
java.lang.Object
  extended by de.smartics.properties.core.services.AbstractServiceFactory<T>
      extended by de.smartics.properties.core.services.AbstractJndiBackedServiceFactory<CacheManager>
          extended by de.smartics.properties.spi.config.cache.CacheManagerFactory

public final class CacheManagerFactory
     
     
extends de.smartics.properties.core.services.AbstractJndiBackedServiceFactory< CacheManager>

Creates instances of the CacheManager.

Returns the manager for caches. The manager class is registered in META-INF/services/de.smartics.properties.spi.config.cache.CacheManager .

Issues a warning if more than one implementation is found. Returns an instance of the first implementation found. If no type is specified, returns an instance of AmnesiaCacheManager per default.


Method Summary
 CacheManager createManager()
          Returns the a new instance of a cache manager.
static CacheManagerFactory getInstance()
          Returns the singleton instance for this factory.
 CacheManager getManager(String id)
          Returns the an instance of a cache manager for a given id or create a new one on first request.
 
Methods inherited from class de.smartics.properties.core.services.AbstractServiceFactory
create, create, createBackup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CacheManagerFactory getInstance()
Returns the singleton instance for this factory.

Returns:
the singleton instance.

createManager

public CacheManager createManager()
Returns the a new instance of a cache manager.

Returns:
a new instance of a cache manager. Never null.

getManager

public CacheManager getManager(String id)
Returns the an instance of a cache manager for a given id or create a new one on first request.

Parameters:
id - fetch the cache manager for the given id or create a new one on first request.
Returns:
an instance of a cache manager. Never null.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.