org.figure8.join.services.cache
Class EternalCacheAccessor

java.lang.Object
  extended by org.figure8.join.services.cache.EternalCacheAccessor

public class EternalCacheAccessor
extends java.lang.Object

The goal of cache accessor is to provide an easy access to cached data from web-tier layers. As a convenience, it provides a static key for being registered within a ServletContext or some other application context.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
static java.lang.String CONTEXT_KEY
          An EternalCacheAccessor instance is registered within the web-tier context using this CONTEXT_KEY
 
Constructor Summary
EternalCacheAccessor(CacheManager cacheManager, CacheLoader cacheLoader)
          Creates a new instance of EternaleCacheAccessor with initiliazed CacheManager and loaded eternal caches.
 
Method Summary
 Cache getCache(java.lang.String cacheKey)
          Retrieve an arbitrary Cache using its key identifier
 java.util.List getCachedDeliverableTypes()
          Retrieve all the DeliverableType domain objects present in cache
 java.util.List getCachedReleases()
          Retrieve all the Release domain objects present in cache
 java.util.List getCachedRoles()
          Retrieve all the Role domain objects present in cache
 java.util.List getCachedSteps()
          Retrieve all the Step domain objects present in cache
 CacheManager getCacheManager()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_KEY

public static final java.lang.String CONTEXT_KEY
An EternalCacheAccessor instance is registered within the web-tier context using this CONTEXT_KEY

See Also:
Constant Field Values
Constructor Detail

EternalCacheAccessor

public EternalCacheAccessor(CacheManager cacheManager,
                            CacheLoader cacheLoader)
Creates a new instance of EternaleCacheAccessor with initiliazed CacheManager and loaded eternal caches. The instance of CacheLoader is also passed as a parameter because cache may have a lazy loading policy. Thus, this accessor will check for loading to occur.

Parameters:
cacheManager - The initiliazed manager to access caches from
cacheLoader - The loader that should have loaded eternal caches.
Method Detail

getCacheManager

public CacheManager getCacheManager()
Returns:
The CacheManager instance used by this accessor

getCache

public Cache getCache(java.lang.String cacheKey)
Retrieve an arbitrary Cache using its key identifier

Parameters:
cacheKey - The key of the cache to retrieve
Returns:
The Cache object corresponding or null if not found

getCachedSteps

public java.util.List getCachedSteps()
Retrieve all the Step domain objects present in cache

Returns:
The list of cached Step

getCachedRoles

public java.util.List getCachedRoles()
Retrieve all the Role domain objects present in cache

Returns:
The list of cached Role

getCachedReleases

public java.util.List getCachedReleases()
Retrieve all the Release domain objects present in cache

Returns:
The list of cached Release

getCachedDeliverableTypes

public java.util.List getCachedDeliverableTypes()
Retrieve all the DeliverableType domain objects present in cache

Returns:
The list of cached DeliverableType


Copyright © 2005-2008 Join. All Rights Reserved.