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

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

public class CacheModel
extends Object
implements NotificationListener


Field Summary
static String[] ATTRS
           
static String COHERENT_PROP
           
static String DISK_PERSISTENT_PROP
           
static String ENABLED_PROP
           
static String ETERNAL_PROP
           
static String[] HEADERS
           
static String LOGGING_ENABLED_PROP
           
static String MAX_ELEMENTS_IN_MEMORY_PROP
           
static String MAX_ELEMENTS_ON_DISK_PROP
           
static String[] MBEAN_ATTRS
           
static String MEMORY_STORE_EVICTION_POLICY_PROP
           
static String OVERFLOW_TO_DISK_PROP
           
protected  PropertyChangeSupport propertyChangeSupport
           
static String TERRACOTTA_CLUSTERED_PROP
           
static String TIME_TO_IDLE_SECONDS_PROP
           
static String TIME_TO_LIVE_SECONDS_PROP
           
 
Constructor Summary
CacheModel(CacheManagerModel cacheManagerModel, String cacheName)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
           
 CacheStatisticsModel getAggregateCacheStatistics()
           
 String getCacheName()
           
 CacheStatisticsModel getCacheStatistics(IClient client)
           
 int getMaxElementsInMemory()
           
 int getMaxElementsOnDisk()
           
 String getMemoryStoreEvictionPolicy()
           
 String getShortName()
           
 long getTimeToIdleSeconds()
           
 long getTimeToLiveSeconds()
           
 void handleNotification(Notification notif, Object data)
           
 boolean isCoherent()
           
 boolean isDiskPersistent()
           
 boolean isEnabled()
           
 boolean isEternal()
           
 boolean isLoggingEnabled()
           
 boolean isOverflowToDisk()
           
 boolean isTerracottaClustered()
           
 void removeAll()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void setAttributes(Map<String,Object> attrs)
           
 void setCoherent(boolean coherent)
           
 void setDiskPersistent(boolean diskPersistent)
           
 void setEnabled(boolean enabled)
           
 void setEternal(boolean eternal)
           
 void setLoggingEnabled(boolean enabled)
           
 void setMaxElementsInMemory(int maxElements)
           
 void setMaxElementsOnDisk(int maxElements)
           
 void setMemoryStoreEvictionPolicy(String evictionPolicy)
           
 void setOverflowToDisk(boolean overflowToDisk)
           
 void setTerracottaClustered(boolean terracottaClustered)
           
 void setTimeToIdleSeconds(long tti)
           
 void setTimeToLiveSeconds(long ttl)
           
 void tearDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_ATTRS

public static final String[] MBEAN_ATTRS

ATTRS

public static final String[] ATTRS

HEADERS

public static final String[] HEADERS

ENABLED_PROP

public static final String ENABLED_PROP
See Also:
Constant Field Values

COHERENT_PROP

public static final String COHERENT_PROP
See Also:
Constant Field Values

LOGGING_ENABLED_PROP

public static final String LOGGING_ENABLED_PROP
See Also:
Constant Field Values

MAX_ELEMENTS_IN_MEMORY_PROP

public static final String MAX_ELEMENTS_IN_MEMORY_PROP
See Also:
Constant Field Values

MAX_ELEMENTS_ON_DISK_PROP

public static final String MAX_ELEMENTS_ON_DISK_PROP
See Also:
Constant Field Values

TIME_TO_IDLE_SECONDS_PROP

public static final String TIME_TO_IDLE_SECONDS_PROP
See Also:
Constant Field Values

TIME_TO_LIVE_SECONDS_PROP

public static final String TIME_TO_LIVE_SECONDS_PROP
See Also:
Constant Field Values

MEMORY_STORE_EVICTION_POLICY_PROP

public static final String MEMORY_STORE_EVICTION_POLICY_PROP
See Also:
Constant Field Values

DISK_PERSISTENT_PROP

public static final String DISK_PERSISTENT_PROP
See Also:
Constant Field Values

ETERNAL_PROP

public static final String ETERNAL_PROP
See Also:
Constant Field Values

OVERFLOW_TO_DISK_PROP

public static final String OVERFLOW_TO_DISK_PROP
See Also:
Constant Field Values

TERRACOTTA_CLUSTERED_PROP

public static final String TERRACOTTA_CLUSTERED_PROP
See Also:
Constant Field Values

propertyChangeSupport

protected PropertyChangeSupport propertyChangeSupport
Constructor Detail

CacheModel

public CacheModel(CacheManagerModel cacheManagerModel,
                  String cacheName)
Method Detail

setAttributes

public void setAttributes(Map<String,Object> attrs)

getCacheName

public String getCacheName()

getShortName

public String getShortName()

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

isCoherent

public boolean isCoherent()

setCoherent

public void setCoherent(boolean coherent)

setLoggingEnabled

public void setLoggingEnabled(boolean enabled)

isLoggingEnabled

public boolean isLoggingEnabled()

getMaxElementsInMemory

public int getMaxElementsInMemory()

setMaxElementsInMemory

public void setMaxElementsInMemory(int maxElements)

getMaxElementsOnDisk

public int getMaxElementsOnDisk()

setMaxElementsOnDisk

public void setMaxElementsOnDisk(int maxElements)

getTimeToIdleSeconds

public long getTimeToIdleSeconds()

setTimeToIdleSeconds

public void setTimeToIdleSeconds(long tti)

getTimeToLiveSeconds

public long getTimeToLiveSeconds()

setTimeToLiveSeconds

public void setTimeToLiveSeconds(long ttl)

getMemoryStoreEvictionPolicy

public String getMemoryStoreEvictionPolicy()

setMemoryStoreEvictionPolicy

public void setMemoryStoreEvictionPolicy(String evictionPolicy)

setDiskPersistent

public void setDiskPersistent(boolean diskPersistent)

isDiskPersistent

public boolean isDiskPersistent()

setEternal

public void setEternal(boolean eternal)

isEternal

public boolean isEternal()

setOverflowToDisk

public void setOverflowToDisk(boolean overflowToDisk)

isOverflowToDisk

public boolean isOverflowToDisk()

setTerracottaClustered

public void setTerracottaClustered(boolean terracottaClustered)

isTerracottaClustered

public boolean isTerracottaClustered()

getCacheStatistics

public CacheStatisticsModel getCacheStatistics(IClient client)

getAggregateCacheStatistics

public CacheStatisticsModel getAggregateCacheStatistics()

removeAll

public void removeAll()
               throws Exception
Throws:
Exception

handleNotification

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

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)

tearDown

public void tearDown()


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