org.terracotta.modules.ehcache.presentation.model
Class CacheManagerModel

java.lang.Object
  extended by org.terracotta.modules.ehcache.presentation.model.CacheManagerModel
All Implemented Interfaces:
PropertyChangeListener, EventListener, NotificationListener

public class CacheManagerModel
extends Object
implements NotificationListener, PropertyChangeListener


Field Summary
static String CACHE_NAMES_ATTR
           
static String CACHES_ENABLED_ATTR
           
static String STATS_ENABLED_ATTR
           
 
Constructor Summary
CacheManagerModel(EhcacheModel ehCacheModel, String cacheManagerName)
           
 
Method Summary
 void addCacheManagerModelListener(CacheManagerModelListener listener)
           
 CacheModel addCacheModel(CacheModel cacheModel)
           
 void cacheChanged(CacheModel cacheModel)
           
 Iterator<CacheModel> cacheModelIter()
           
 void clearAllCaches()
           
 void clearStatistics()
           
protected  void fireCacheAdded(CacheModel cacheModel)
           
protected  void fireCacheChanged(CacheModel cacheModel)
           
protected  void fireCacheRemoved(CacheModel cacheModel)
           
protected  void fireCachesEnabled()
           
protected  void fireStatisticsEnabled()
           
 String generateActiveConfigDeclaration()
           
 IServer getActiveCoordinator()
           
 CacheModel getCacheModel(String cacheName)
           
 IClusterModel getClusterModel()
           
 EhcacheModel getEhcacheModel()
           
 String getName()
           
 ObjectName getSampledCacheManagerBeanName()
           
 void handleNotification(Notification notif, Object data)
           
 boolean hasCacheModel(String cacheName)
           
 boolean isCachesEnabled()
           
 boolean isStatsEnabled()
           
 void propertyChange(PropertyChangeEvent evt)
           
 void removeCacheManagerModelListener(CacheManagerModelListener listener)
           
 CacheModel removeCacheModel(String cacheName)
           
 void setCachesEnabled(boolean enabled)
           
 void setStatsEnabled(boolean enabled)
           
 void tearDown()
           
 void toggleStatsEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_NAMES_ATTR

public static final String CACHE_NAMES_ATTR
See Also:
Constant Field Values

STATS_ENABLED_ATTR

public static final String STATS_ENABLED_ATTR
See Also:
Constant Field Values

CACHES_ENABLED_ATTR

public static final String CACHES_ENABLED_ATTR
See Also:
Constant Field Values
Constructor Detail

CacheManagerModel

public CacheManagerModel(EhcacheModel ehCacheModel,
                         String cacheManagerName)
Method Detail

getName

public String getName()

getSampledCacheManagerBeanName

public ObjectName getSampledCacheManagerBeanName()

getClusterModel

public IClusterModel getClusterModel()

getActiveCoordinator

public IServer getActiveCoordinator()

getEhcacheModel

public EhcacheModel getEhcacheModel()

cacheModelIter

public Iterator<CacheModel> cacheModelIter()

getCacheModel

public CacheModel getCacheModel(String cacheName)

hasCacheModel

public boolean hasCacheModel(String cacheName)

removeCacheModel

public CacheModel removeCacheModel(String cacheName)

addCacheModel

public CacheModel addCacheModel(CacheModel cacheModel)

cacheChanged

public void cacheChanged(CacheModel cacheModel)

clearStatistics

public void clearStatistics()
                     throws Exception
Throws:
Exception

setStatsEnabled

public void setStatsEnabled(boolean enabled)
                     throws Exception
Throws:
Exception

toggleStatsEnabled

public void toggleStatsEnabled()
                        throws Exception
Throws:
Exception

isStatsEnabled

public boolean isStatsEnabled()

clearAllCaches

public void clearAllCaches()
                    throws Exception
Throws:
Exception

setCachesEnabled

public void setCachesEnabled(boolean enabled)
                      throws Exception
Throws:
Exception

isCachesEnabled

public boolean isCachesEnabled()

handleNotification

public void handleNotification(Notification notif,
                               Object data)
Specified by:
handleNotification in interface NotificationListener

addCacheManagerModelListener

public void addCacheManagerModelListener(CacheManagerModelListener listener)

removeCacheManagerModelListener

public void removeCacheManagerModelListener(CacheManagerModelListener listener)

fireCacheAdded

protected void fireCacheAdded(CacheModel cacheModel)

fireCacheRemoved

protected void fireCacheRemoved(CacheModel cacheModel)

fireCacheChanged

protected void fireCacheChanged(CacheModel cacheModel)

fireStatisticsEnabled

protected void fireStatisticsEnabled()

fireCachesEnabled

protected void fireCachesEnabled()

generateActiveConfigDeclaration

public String generateActiveConfigDeclaration()

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

tearDown

public void tearDown()


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.