org.wso2.carbon.caching.impl
Class CacheManagerFactoryImpl

java.lang.Object
  extended by org.wso2.carbon.caching.impl.CacheManagerFactoryImpl
All Implemented Interfaces:
CacheManagerFactory

public class CacheManagerFactoryImpl
extends Object
implements CacheManagerFactory

TODO: class description


Constructor Summary
CacheManagerFactoryImpl()
           
 
Method Summary
 void close()
          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.
 CacheManager getCacheManager(ClassLoader classLoader, String name)
          Get the cache manager for the specified name and class loader.
 CacheManager getCacheManager(String cacheManagerName)
          Get a named cache manager using the default cache loader as specified by the implementation.
 void removeCacheManager(CarbonCacheManager cacheManager, String tenantDomain)
           
 void removeCacheManagerMap(String tenantDomain)
          remove cache manager map from global cache manager map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheManagerFactoryImpl

public CacheManagerFactoryImpl()
Method Detail

getCacheManager

public CacheManager getCacheManager(String cacheManagerName)
Description copied from interface: CacheManagerFactory
Get a named cache manager using the default cache loader as specified by the implementation.

Specified by:
getCacheManager in interface CacheManagerFactory
Parameters:
cacheManagerName - the name of the cache manager
Returns:
the named cache manager

getCacheManager

public CacheManager getCacheManager(ClassLoader classLoader,
                                    String name)
Description copied from interface: CacheManagerFactory
Get the cache manager for the specified name and class loader.

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

Specified by:
getCacheManager in interface CacheManagerFactory
Parameters:
classLoader - associated with the cache manager.
name - the name of the cache manager
Returns:
the new cache manager

close

public void close()
           throws CachingShutdownException
Description copied from interface: CacheManagerFactory
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.

Specified by:
close in interface CacheManagerFactory
Throws:
CachingShutdownException - if any of the individual shutdowns failed

close

public boolean close(ClassLoader classLoader)
              throws CachingShutdownException
Description copied from interface: CacheManagerFactory
Reclaims all resources for a ClassLoader from this factory.

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

Specified by:
close in interface CacheManagerFactory
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

public boolean close(ClassLoader classLoader,
                     String name)
              throws CachingShutdownException
Description copied from interface: CacheManagerFactory
Reclaims all resources for a ClassLoader from this factory.

the named cache manager obtained from the factory is shutdown.

Specified by:
close in interface CacheManagerFactory
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

removeCacheManager

public void removeCacheManager(CarbonCacheManager cacheManager,
                               String tenantDomain)

removeCacheManagerMap

public void removeCacheManagerMap(String tenantDomain)
remove cache manager map from global cache manager map

Parameters:
tenantDomain - - Tenant Domain


Copyright © 2014 WSO2 Inc. All rights reserved.