ehcache

net.sf.ehcache.management
Class CacheConfiguration

java.lang.Object
  extended by net.sf.ehcache.management.CacheConfiguration
All Implemented Interfaces:
Serializable, CacheConfigurationMBean

public class CacheConfiguration
extends Object
implements CacheConfigurationMBean, Serializable

A JMX MBean implementation and decorator to net.sf.ehcache.CacheConfiguration

Since:
1.3
Version:
$Id: CacheConfiguration.java 5594 2012-05-07 16:04:31Z cdennis $
Author:
Greg Luck
See Also:
Serialized Form

Constructor Summary
CacheConfiguration(Ehcache cache)
          Constructs using a backing CacheConfiguration
 
Method Summary
 long getDiskExpiryThreadIntervalSeconds()
          Accessor
 int getDiskSpoolBufferSizeMB()
          Accessor
 long getMaxBytesLocalDisk()
          Maximum number of bytes that may be stored in the local disk store.
 long getMaxBytesLocalHeap()
          Maximum number of bytes that may be stored in local heap memory store.
 long getMaxBytesLocalOffHeap()
          Maximum number of bytes that may be stored in local off-heap memory store.
 int getMaxElementsInMemory()
          Deprecated. use getMaxEntriesLocalHeap()
 int getMaxElementsOnDisk()
          Deprecated. use getMaxEntriesLocalDisk()
 long getMaxEntriesLocalDisk()
          Maximum number of entries that may be stored in the local disk store.
 long getMaxEntriesLocalHeap()
          Maximum number of entries that may be stored in local heap memory store.
 long getMaxMemoryOffHeapInBytes()
          Deprecated. use getMaxBytesLocalOffHeap()
 String getMemoryStoreEvictionPolicy()
          Accessor
 String getName()
          Accessor
 String getTerracottaConsistency()
          Accessor
 long getTimeToIdleSeconds()
          Accessor
 long getTimeToLiveSeconds()
          Accessor
 boolean isDiskPersistent()
          Accessor
 boolean isEternal()
          Accessor
 boolean isLoggingEnabled()
          Accessor
 boolean isOverflowToDisk()
          Accessor
 boolean isOverflowToOffHeap()
          Accessor
 boolean isTerracottaClustered()
          Accessor
 void setDiskExpiryThreadIntervalSeconds(long diskExpiryThreadIntervalSeconds)
          setDiskExpiryThreadIntervalSeconds
 void setDiskPersistent(boolean diskPersistent)
          setDiskPersistent
 void setDiskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
          setDiskSpoolBufferSizeMB
 void setEternal(boolean eternal)
          setEternal
 void setLoggingEnabled(boolean enable)
          setLoggingEnabled
 void setMaxElementsInMemory(int maxElements)
          Deprecated. use setMaxEntriesLocalHeap(long)
 void setMaxElementsOnDisk(int maxElements)
          Deprecated. use setMaxEntriesLocalDisk(long)
 void setMaxEntriesLocalDisk(long maxEntries)
          Maximum number of entries that may be stores in the local disk store.
 void setMaxEntriesLocalHeap(long maxEntries)
          Maximum number of entries that may be stored in local heap memory store.
 void setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
          setMemoryStoreEvictionPolicy
 void setOverflowToDisk(boolean overflowToDisk)
          setOverflowToDisk
 void setTimeToIdleSeconds(long tti)
          setTimeToIdleSeconds
 void setTimeToLiveSeconds(long ttl)
          setTimeToLiveSeconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheConfiguration

public CacheConfiguration(Ehcache cache)
Constructs using a backing CacheConfiguration

Parameters:
cache -
Method Detail

getName

public String getName()
Accessor

Specified by:
getName in interface CacheConfigurationMBean

isLoggingEnabled

public boolean isLoggingEnabled()
Accessor

Specified by:
isLoggingEnabled in interface CacheConfigurationMBean

setLoggingEnabled

public void setLoggingEnabled(boolean enable)
setLoggingEnabled

Specified by:
setLoggingEnabled in interface CacheConfigurationMBean
Parameters:
enable -

getMaxElementsInMemory

@Deprecated
public int getMaxElementsInMemory()
Deprecated. use getMaxEntriesLocalHeap()

Accessor

Specified by:
getMaxElementsInMemory in interface CacheConfigurationMBean

setMaxElementsInMemory

@Deprecated
public void setMaxElementsInMemory(int maxElements)
Deprecated. use setMaxEntriesLocalHeap(long)

setMaxElementsInMemory

Specified by:
setMaxElementsInMemory in interface CacheConfigurationMBean
Parameters:
maxElements -

getMaxElementsOnDisk

@Deprecated
public int getMaxElementsOnDisk()
Deprecated. use getMaxEntriesLocalDisk()

Accessor

Specified by:
getMaxElementsOnDisk in interface CacheConfigurationMBean

setMaxElementsOnDisk

@Deprecated
public void setMaxElementsOnDisk(int maxElements)
Deprecated. use setMaxEntriesLocalDisk(long)

setMaxElementsOnDisk

Specified by:
setMaxElementsOnDisk in interface CacheConfigurationMBean
Parameters:
maxElements -

getMemoryStoreEvictionPolicy

public String getMemoryStoreEvictionPolicy()
Accessor

Specified by:
getMemoryStoreEvictionPolicy in interface CacheConfigurationMBean
Returns:
a String representation of the policy

setMemoryStoreEvictionPolicy

public void setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
setMemoryStoreEvictionPolicy

Specified by:
setMemoryStoreEvictionPolicy in interface CacheConfigurationMBean
Parameters:
memoryStoreEvictionPolicy -

isEternal

public boolean isEternal()
Accessor

Specified by:
isEternal in interface CacheConfigurationMBean

setEternal

public void setEternal(boolean eternal)
setEternal

Specified by:
setEternal in interface CacheConfigurationMBean
Parameters:
eternal -

getTimeToIdleSeconds

public long getTimeToIdleSeconds()
Accessor

Specified by:
getTimeToIdleSeconds in interface CacheConfigurationMBean

setTimeToIdleSeconds

public void setTimeToIdleSeconds(long tti)
setTimeToIdleSeconds

Specified by:
setTimeToIdleSeconds in interface CacheConfigurationMBean
Parameters:
tti -

getTimeToLiveSeconds

public long getTimeToLiveSeconds()
Accessor

Specified by:
getTimeToLiveSeconds in interface CacheConfigurationMBean

setTimeToLiveSeconds

public void setTimeToLiveSeconds(long ttl)
setTimeToLiveSeconds

Specified by:
setTimeToLiveSeconds in interface CacheConfigurationMBean
Parameters:
ttl -

isOverflowToDisk

public boolean isOverflowToDisk()
Accessor

Specified by:
isOverflowToDisk in interface CacheConfigurationMBean

setOverflowToDisk

public void setOverflowToDisk(boolean overflowToDisk)
setOverflowToDisk

Specified by:
setOverflowToDisk in interface CacheConfigurationMBean
Parameters:
overflowToDisk -

isDiskPersistent

public boolean isDiskPersistent()
Accessor

Specified by:
isDiskPersistent in interface CacheConfigurationMBean

setDiskPersistent

public void setDiskPersistent(boolean diskPersistent)
setDiskPersistent

Specified by:
setDiskPersistent in interface CacheConfigurationMBean
Parameters:
diskPersistent -

getDiskSpoolBufferSizeMB

public int getDiskSpoolBufferSizeMB()
Accessor

Specified by:
getDiskSpoolBufferSizeMB in interface CacheConfigurationMBean

setDiskSpoolBufferSizeMB

public void setDiskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
setDiskSpoolBufferSizeMB

Specified by:
setDiskSpoolBufferSizeMB in interface CacheConfigurationMBean
Parameters:
diskSpoolBufferSizeMB -

getDiskExpiryThreadIntervalSeconds

public long getDiskExpiryThreadIntervalSeconds()
Accessor

Specified by:
getDiskExpiryThreadIntervalSeconds in interface CacheConfigurationMBean

setDiskExpiryThreadIntervalSeconds

public final void setDiskExpiryThreadIntervalSeconds(long diskExpiryThreadIntervalSeconds)
setDiskExpiryThreadIntervalSeconds

Specified by:
setDiskExpiryThreadIntervalSeconds in interface CacheConfigurationMBean
Parameters:
diskExpiryThreadIntervalSeconds -

isTerracottaClustered

public boolean isTerracottaClustered()
Accessor

Specified by:
isTerracottaClustered in interface CacheConfigurationMBean

getTerracottaConsistency

public String getTerracottaConsistency()
Accessor

Specified by:
getTerracottaConsistency in interface CacheConfigurationMBean

isOverflowToOffHeap

public boolean isOverflowToOffHeap()
Accessor

Specified by:
isOverflowToOffHeap in interface CacheConfigurationMBean

getMaxMemoryOffHeapInBytes

@Deprecated
public long getMaxMemoryOffHeapInBytes()
Deprecated. use getMaxBytesLocalOffHeap()

Accessor

Specified by:
getMaxMemoryOffHeapInBytes in interface CacheConfigurationMBean

getMaxEntriesLocalDisk

public long getMaxEntriesLocalDisk()
Maximum number of entries that may be stored in the local disk store.

Specified by:
getMaxEntriesLocalDisk in interface CacheConfigurationMBean

getMaxEntriesLocalHeap

public long getMaxEntriesLocalHeap()
Maximum number of entries that may be stored in local heap memory store.

Specified by:
getMaxEntriesLocalHeap in interface CacheConfigurationMBean

setMaxEntriesLocalDisk

public void setMaxEntriesLocalDisk(long maxEntries)
Maximum number of entries that may be stores in the local disk store.

Specified by:
setMaxEntriesLocalDisk in interface CacheConfigurationMBean

setMaxEntriesLocalHeap

public void setMaxEntriesLocalHeap(long maxEntries)
Maximum number of entries that may be stored in local heap memory store.

Specified by:
setMaxEntriesLocalHeap in interface CacheConfigurationMBean

getMaxBytesLocalDisk

public long getMaxBytesLocalDisk()
Maximum number of bytes that may be stored in the local disk store.

Specified by:
getMaxBytesLocalDisk in interface CacheConfigurationMBean

getMaxBytesLocalHeap

public long getMaxBytesLocalHeap()
Maximum number of bytes that may be stored in local heap memory store.

Specified by:
getMaxBytesLocalHeap in interface CacheConfigurationMBean

getMaxBytesLocalOffHeap

public long getMaxBytesLocalOffHeap()
Maximum number of bytes that may be stored in local off-heap memory store.

Specified by:
getMaxBytesLocalOffHeap in interface CacheConfigurationMBean

ehcache

Copyright 2001-2015, Terracotta, Inc.