com.atlassian.crowd.manager.cache
Class CacheManagerEhcache

java.lang.Object
  extended by com.atlassian.crowd.manager.cache.CacheManagerEhcache
All Implemented Interfaces:
CacheManager

public class CacheManagerEhcache
extends java.lang.Object
implements CacheManager


Field Summary
 
Fields inherited from interface com.atlassian.crowd.manager.cache.CacheManager
DEFAULT_CACHE_TIME_IN_MINUTES
 
Constructor Summary
CacheManagerEhcache(net.sf.ehcache.CacheManager cacheManager)
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void configureCache(java.lang.String cacheName)
          Creates a cache if it doesn't already exist - if the cache has been defined in the configuration xml, then it will not be recreated.
protected  void configureCaches()
           
 java.lang.Object get(java.lang.String key)
           
 java.lang.Object get(java.lang.String cacheName, java.io.Serializable key)
           
 java.util.List getAllKeys()
           
 java.util.List getAllKeys(java.lang.String cacheName)
           
protected  net.sf.ehcache.Cache getCache(java.lang.String cacheName)
           
 void put(java.lang.String key, java.io.Serializable obj)
           
 void put(java.lang.String cacheName, java.io.Serializable key, java.io.Serializable obj)
           
 boolean remove(java.lang.String key)
           
 boolean remove(java.lang.String cacheName, java.io.Serializable key)
           
 void removeAll()
           
 void removeAll(java.lang.String cacheName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheManagerEhcache

public CacheManagerEhcache(net.sf.ehcache.CacheManager cacheManager)
Method Detail

configureCaches

protected void configureCaches()

configureCache

protected void configureCache(java.lang.String cacheName)
Creates a cache if it doesn't already exist - if the cache has been defined in the configuration xml, then it will not be recreated.

Parameters:
cacheName - Name of the cache to ensure exists

getCache

protected net.sf.ehcache.Cache getCache(java.lang.String cacheName)

get

public java.lang.Object get(java.lang.String key)
                     throws CacheManagerException,
                            NotInCacheException
Specified by:
get in interface CacheManager
Throws:
CacheManagerException
NotInCacheException

put

public void put(java.lang.String key,
                java.io.Serializable obj)
         throws CacheManagerException
Specified by:
put in interface CacheManager
Throws:
CacheManagerException

remove

public boolean remove(java.lang.String key)
               throws CacheManagerException
Specified by:
remove in interface CacheManager
Throws:
CacheManagerException

removeAll

public void removeAll()
               throws CacheManagerException
Specified by:
removeAll in interface CacheManager
Throws:
CacheManagerException

getAllKeys

public java.util.List getAllKeys()
                          throws CacheManagerException
Specified by:
getAllKeys in interface CacheManager
Throws:
CacheManagerException

put

public void put(java.lang.String cacheName,
                java.io.Serializable key,
                java.io.Serializable obj)
         throws CacheManagerException
Specified by:
put in interface CacheManager
Throws:
CacheManagerException

get

public java.lang.Object get(java.lang.String cacheName,
                            java.io.Serializable key)
                     throws CacheManagerException,
                            NotInCacheException
Specified by:
get in interface CacheManager
Throws:
CacheManagerException
NotInCacheException

remove

public boolean remove(java.lang.String cacheName,
                      java.io.Serializable key)
               throws CacheManagerException
Specified by:
remove in interface CacheManager
Throws:
CacheManagerException

removeAll

public void removeAll(java.lang.String cacheName)
               throws CacheManagerException
Specified by:
removeAll in interface CacheManager
Throws:
CacheManagerException

getAllKeys

public java.util.List getAllKeys(java.lang.String cacheName)
                          throws CacheManagerException
Specified by:
getAllKeys in interface CacheManager
Throws:
CacheManagerException

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.