com.ca.jcs.cache
Class EHCacheManager

java.lang.Object
  extended by com.ca.jcs.cache.CacheManager
      extended by com.ca.jcs.cache.EHCacheManager
All Implemented Interfaces:
Activatable

public class EHCacheManager
extends CacheManager

Cache manager making use of EHCache, defining two different caches; one for containers and one for leafObjects.


Field Summary
 
Fields inherited from class com.ca.jcs.cache.CacheManager
log
 
Constructor Summary
EHCacheManager(Logger log, String configReference)
           
 
Method Summary
 void activate()
          This method is called when the target object has been fully initialised, and is ready to receive requests.
 void deactivate()
          This method is called when the target object is no longer needed and should tidy-up any connections / resources it holds.
 void debugDump()
          Dump the whole state of the cache to the log to aid in debugging.
 CachedObjectInfo getCached(Name ldapDn)
          Return information cached for provided DN, or null if none is found (or its expired).
 void putCached(LdapDN ldapDn, CachedObjectInfo cachedObjectInfo)
          Record information in cache, which may expire or be flushed later according to configuration.
 boolean removeCached(LdapDN ldapDn, boolean isContainer)
          Remove all information cached for the provided object and any of its contained children.
 
Methods inherited from class com.ca.jcs.cache.CacheManager
debug, entryString, get, put, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EHCacheManager

public EHCacheManager(Logger log,
                      String configReference)
Method Detail

debugDump

public void debugDump()
Description copied from class: CacheManager
Dump the whole state of the cache to the log to aid in debugging.

Specified by:
debugDump in class CacheManager

activate

public void activate()
              throws NamingException
Description copied from interface: Activatable
This method is called when the target object has been fully initialised, and is ready to receive requests.

Throws:
NamingException

deactivate

public void deactivate()
                throws NamingException
Description copied from interface: Activatable
This method is called when the target object is no longer needed and should tidy-up any connections / resources it holds.

Throws:
NamingException

getCached

public CachedObjectInfo getCached(Name ldapDn)
Description copied from class: CacheManager
Return information cached for provided DN, or null if none is found (or its expired).

Specified by:
getCached in class CacheManager

putCached

public void putCached(LdapDN ldapDn,
                      CachedObjectInfo cachedObjectInfo)
               throws Exception
Description copied from class: CacheManager
Record information in cache, which may expire or be flushed later according to configuration.

Specified by:
putCached in class CacheManager
Throws:
Exception

removeCached

public boolean removeCached(LdapDN ldapDn,
                            boolean isContainer)
Description copied from class: CacheManager
Remove all information cached for the provided object and any of its contained children.

Specified by:
removeCached in class CacheManager


Created 2011-07-14 13:27 EST