|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.utils.cache.WhirlyCacheCacheFactory
public final class WhirlyCacheCacheFactory
Implementation of the CacheFactory that will return instances of a cache
backed by WhirlyCache.
As WhirlyCache does not use the standard map API, these caches are wrapped by a Map.
| Nested Class Summary | |
|---|---|
protected static class |
WhirlyCacheCacheFactory.WhirlyCacheMap
|
| Field Summary | |
|---|---|
private com.whirlycott.cache.CacheManager |
cacheManager
Instance of WhirlyCache manager in order to manage caches from this factory. |
private java.util.Map |
caches
Map of caches so that we always return the same instance. |
private static org.apache.commons.logging.Log |
log
Instance of Commons Logging for logging purposes |
private static java.lang.String |
LOG_MESSAGE_FOUND_IN_CACHE
Message to display when the cache is found and intanciated already. |
private static java.lang.String |
LOG_MESSAGE_INVALID
Message to display if we cannot find the cache at all. |
private static java.lang.String |
LOG_MESSAGE_NOT_FOUND_IN_CACHE
Message to display if the cache was not found in the map and we instanciate a new one. |
| Fields inherited from interface org.jasig.portal.utils.cache.CacheFactory |
|---|
DEFAULT, PRINCIPAL_CACHE, USER_INFO_CACHE |
| Constructor Summary | |
|---|---|
WhirlyCacheCacheFactory()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String LOG_MESSAGE_FOUND_IN_CACHE
private static final java.lang.String LOG_MESSAGE_NOT_FOUND_IN_CACHE
private static final java.lang.String LOG_MESSAGE_INVALID
private static final org.apache.commons.logging.Log log
private final com.whirlycott.cache.CacheManager cacheManager
private final java.util.Map caches
| Constructor Detail |
|---|
public WhirlyCacheCacheFactory()
| Method Detail |
|---|
public java.util.Map getCache(java.lang.String cacheName)
throws java.lang.IllegalArgumentException
CacheFactory
getCache in interface CacheFactorycacheName - the name of the cache to retrieve.
java.lang.IllegalArgumentException
public java.util.Map getCache()
throws java.lang.IllegalArgumentException
CacheFactory
getCache in interface CacheFactoryjava.lang.IllegalArgumentException
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exception
public void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||