org.jasig.portal.utils.cache
Interface CacheFactory

All Known Implementing Classes:
CacheProviderFactory

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: 19776 $ $Date: 2010-01-14 16:17:21 -0600 (Thu, 14 Jan 2010) $
Author:
Scott Battaglia

Field Summary
static String CONTENT_CACHE
          The cache to be used to hold content.
static String DEFAULT
          Generic default cache that can be used for anything
static String ENTITY_PARENTS_CACHE
           
static String NAME_CACHE
          The cache to be used to hold names.
static String PRINCIPAL_CACHE
          The cache to be used to hold principals.
 
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.
 

Field Detail

PRINCIPAL_CACHE

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

See Also:
Constant Field Values

ENTITY_PARENTS_CACHE

static final String ENTITY_PARENTS_CACHE
See Also:
Constant Field Values

NAME_CACHE

static final String NAME_CACHE
The cache to be used to hold names.

See Also:
Constant Field Values

CONTENT_CACHE

static final String CONTENT_CACHE
The cache to be used to hold content.

See Also:
Constant Field Values

DEFAULT

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

See Also:
Constant Field Values
Method Detail

getCache

<K extends Serializable,V> Map<K,V> getCache(String cacheName)
                                       throws 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:
IllegalArgumentException - if a cache by that name cannot be retrieved.

getCache

<K extends Serializable,V> Map<K,V> getCache()
Method to retrieve a default cache without a name.

Returns:
the default cache for this CacheFactory


Copyright © 2010 Jasig. All Rights Reserved.