org.jasig.portal.utils.cache
Interface CacheFactory

All Known Implementing Classes:
WhirlyCacheCacheFactory

public interface CacheFactory

Interface for a cache factory that returns a cache that externally acts like a map. Underlying caches don't have to be a map, but they must be wrapped in the map interface if they do not.

Version:
$Revision: 1.1.2.1 $ $Date: 2005/10/13 21:40:43 $
Author:
Scott Battaglia

Field Summary
static java.lang.String DEFAULT
          Generic default cache that can be used for anything
static java.lang.String PRINCIPAL_CACHE
          The cache to be used to hold principals.
static java.lang.String USER_INFO_CACHE
          The cache to be used to hold user information.
 
Method Summary
 java.util.Map getCache()
          Method to retrieve a default cache without a name.
 java.util.Map getCache(java.lang.String cacheName)
          Method to retrieve a cache by name.
 

Field Detail

USER_INFO_CACHE

static final java.lang.String USER_INFO_CACHE
The cache to be used to hold user information.

See Also:
Constant Field Values

PRINCIPAL_CACHE

static final java.lang.String PRINCIPAL_CACHE
The cache to be used to hold principals.

See Also:
Constant Field Values

DEFAULT

static final java.lang.String DEFAULT
Generic default cache that can be used for anything

See Also:
Constant Field Values
Method Detail

getCache

java.util.Map getCache(java.lang.String cacheName)
                       throws java.lang.IllegalArgumentException
Method to retrieve a cache by name.

Parameters:
cacheName - the name of the cache to retrieve.
Returns:
the cache that is referenced by the cache name provided.
Throws:
java.lang.IllegalArgumentException

getCache

java.util.Map getCache()
Method to retrieve a default cache without a name.

Returns:
the default cache for this CacheFactory