com.atlassian.crowd.manager.directory.cache
Class DirectoryCacheManagerImpl

java.lang.Object
  extended by com.atlassian.crowd.manager.directory.cache.DirectoryCacheManagerImpl
All Implemented Interfaces:
DirectoryCacheManager, com.atlassian.event.EventListener

public class DirectoryCacheManagerImpl
extends java.lang.Object
implements DirectoryCacheManager, com.atlassian.event.EventListener


Constructor Summary
DirectoryCacheManagerImpl(net.sf.ehcache.CacheManager ehcacheManager, com.atlassian.event.EventManager eventManager, DirectoryManager directoryManager)
           
 
Method Summary
protected  DirectoryCache clearExistingOrInitialiseNewCache(long directoryID)
           
protected  DirectoryCache createCacheAndRegisterListenerIfRequired(long directoryID)
           
 DirectoryCache getCache(long directoryID)
           
protected  DirectoryCache getExistingCache(long directoryID)
           
 java.lang.Class[] getHandledEventClasses()
           
protected  java.lang.String getListenerName(long directoryID)
           
 void handleEvent(com.atlassian.event.Event event)
           
 boolean hasCache(long directoryID)
           
protected  DirectoryCache instantiateCache(long directoryID)
           
protected  void removeAllCaches()
           
 void removeCache(long directoryID)
           
 DirectoryCache resetCache(long directoryID)
           
protected  void unregisterListenerAndRemoveCacheIfPresent(long directoryID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryCacheManagerImpl

public DirectoryCacheManagerImpl(net.sf.ehcache.CacheManager ehcacheManager,
                                 com.atlassian.event.EventManager eventManager,
                                 DirectoryManager directoryManager)
Method Detail

getCache

public DirectoryCache getCache(long directoryID)
                        throws java.lang.InstantiationException
Specified by:
getCache in interface DirectoryCacheManager
Throws:
java.lang.InstantiationException

removeCache

public void removeCache(long directoryID)
Specified by:
removeCache in interface DirectoryCacheManager

hasCache

public boolean hasCache(long directoryID)
Specified by:
hasCache in interface DirectoryCacheManager

resetCache

public DirectoryCache resetCache(long directoryID)
                          throws java.lang.InstantiationException
Specified by:
resetCache in interface DirectoryCacheManager
Throws:
java.lang.InstantiationException

getExistingCache

protected DirectoryCache getExistingCache(long directoryID)

createCacheAndRegisterListenerIfRequired

protected DirectoryCache createCacheAndRegisterListenerIfRequired(long directoryID)
                                                           throws java.lang.InstantiationException
Throws:
java.lang.InstantiationException

unregisterListenerAndRemoveCacheIfPresent

protected void unregisterListenerAndRemoveCacheIfPresent(long directoryID)

clearExistingOrInitialiseNewCache

protected DirectoryCache clearExistingOrInitialiseNewCache(long directoryID)
                                                    throws java.lang.InstantiationException
Throws:
java.lang.InstantiationException

instantiateCache

protected DirectoryCache instantiateCache(long directoryID)
                                   throws java.lang.InstantiationException
Throws:
java.lang.InstantiationException

removeAllCaches

protected void removeAllCaches()

getListenerName

protected java.lang.String getListenerName(long directoryID)

handleEvent

public void handleEvent(com.atlassian.event.Event event)
Specified by:
handleEvent in interface com.atlassian.event.EventListener

getHandledEventClasses

public java.lang.Class[] getHandledEventClasses()
Specified by:
getHandledEventClasses in interface com.atlassian.event.EventListener


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.