org.jasig.portal.utils.cache
Class CacheProviderFactory

java.lang.Object
  extended by org.jasig.portal.utils.cache.CacheProviderFactory
All Implemented Interfaces:
CacheFactory

public class CacheProviderFactory
extends Object
implements CacheFactory

CacheFactory impl that provides Map instances that wrap a configured CacheProviderFacade. This uses the MapCacheProvider to perform the wrapping. Refer to that class for which operations on the Map interface are supported.

Version:
$Revision$
Author:
Eric Dalquist

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Fields inherited from interface org.jasig.portal.utils.cache.CacheFactory
CONTENT_CACHE, DEFAULT, ENTITY_PARENTS_CACHE, NAME_CACHE, PRINCIPAL_CACHE
 
Constructor Summary
CacheProviderFactory()
           
 
Method Summary
<K extends Serializable,V>
Map<K,V>
getCache()
          Method to retrieve a default cache without a name.
<K extends Serializable,V>
Map<K,V>
getCache(String cacheName)
          Method to retrieve a cache by name.
 ICacheModelFactory getCacheModelFactory()
           
 org.springmodules.cache.provider.CacheProviderFacade getCacheProviderFacade()
           
 void setCacheModelFactory(ICacheModelFactory cacheModelFactory)
           
 void setCacheProviderFacade(org.springmodules.cache.provider.CacheProviderFacade cacheProviderFacade)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

CacheProviderFactory

public CacheProviderFactory()
Method Detail

getCacheProviderFacade

public org.springmodules.cache.provider.CacheProviderFacade getCacheProviderFacade()
Returns:
the cacheProviderFacade

setCacheProviderFacade

public void setCacheProviderFacade(org.springmodules.cache.provider.CacheProviderFacade cacheProviderFacade)
Parameters:
cacheProviderFacade - the cacheProviderFacade to set

getCacheModelFactory

public ICacheModelFactory getCacheModelFactory()
Returns:
the cacheModelFactory

setCacheModelFactory

public void setCacheModelFactory(ICacheModelFactory cacheModelFactory)
Parameters:
cacheModelFactory - the cacheModelFactory to set

getCache

public <K extends Serializable,V> Map<K,V> getCache()
Description copied from interface: CacheFactory
Method to retrieve a default cache without a name.

Specified by:
getCache in interface CacheFactory
Returns:
the default cache for this CacheFactory

getCache

public <K extends Serializable,V> Map<K,V> getCache(String cacheName)
                                       throws IllegalArgumentException
Description copied from interface: CacheFactory
Method to retrieve a cache by name.

Specified by:
getCache in interface CacheFactory
Parameters:
cacheName - the name of the cache to retrieve.
Returns:
the cache that is referenced by the cache name provided.
Throws:
IllegalArgumentException - if a cache by that name cannot be retrieved.


Copyright © 2010 Jasig. All Rights Reserved.