|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.config.CacheConfiguration
public class CacheConfiguration
A value object used to represent cache configuration.
Cache
in Ehcache 2.0 and above is to create a CacheConfiguration
object
and pass it to the Cache
constructor. See Cache.Cache(CacheConfiguration)
.
This class supports setter injection and also the fluent builder pattern.
e.g.
Cache cache = new Cache(new CacheConfiguration("test2", 1000).eternal(true).memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy.FIFO));
ehcache.xml
configuration file.
e.g.
<cache name="testCache1"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="10"
overflowToDisk="true"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="120"
maxElementsOnDisk="10000"
/>
Nested Class Summary | |
---|---|
static class |
CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration
Configuration for the BootstrapCacheLoaderFactoryConfiguration. |
static class |
CacheConfiguration.CacheEventListenerFactoryConfiguration
Configuration for the CachePeerListenerFactoryConfiguration. |
static class |
CacheConfiguration.CacheExceptionHandlerFactoryConfiguration
Configuration for the BootstrapCacheLoaderFactoryConfiguration. |
static class |
CacheConfiguration.CacheExtensionFactoryConfiguration
Configuration for the CacheExtensionFactoryConfiguration. |
static class |
CacheConfiguration.CacheLoaderFactoryConfiguration
Configuration for the CacheLoaderFactoryConfiguration. |
static class |
CacheConfiguration.TransactionalMode
Represents whether the Cache is transactional or not. |
Field Summary | |
---|---|
protected CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration |
bootstrapCacheLoaderFactoryConfiguration
The BootstrapCacheLoaderFactoryConfiguration. |
protected java.util.List<CacheConfiguration.CacheEventListenerFactoryConfiguration> |
cacheEventListenerConfigurations
The event listener factories added by BeanUtils. |
protected CacheConfiguration.CacheExceptionHandlerFactoryConfiguration |
cacheExceptionHandlerFactoryConfiguration
The CacheExceptionHandlerFactoryConfiguration. |
protected java.util.List<CacheConfiguration.CacheExtensionFactoryConfiguration> |
cacheExtensionConfigurations
The cache extension factories added by BeanUtils. |
protected java.util.List<CacheConfiguration.CacheLoaderFactoryConfiguration> |
cacheLoaderConfigurations
The cache loader factories added by BeanUtils. |
protected CacheWriterConfiguration |
cacheWriterConfiguration
The CacheWriterConfiguration. |
protected boolean |
clearOnFlush
Sets whether the MemoryStore should be cleared when flush() is called on the cache - true by default. |
static int |
DEFAULT_DISK_ACCESS_STRIPES
|
static long |
DEFAULT_EXPIRY_THREAD_INTERVAL_SECONDS
The default interval between runs of the expiry thread. |
static MemoryStoreEvictionPolicy |
DEFAULT_MEMORY_STORE_EVICTION_POLICY
The default memory store eviction policy is LRU. |
static int |
DEFAULT_SPOOL_BUFFER_SIZE
Set a buffer size for the spool of approx 30MB. |
protected int |
diskAccessStripes
The number of concurrent disk access stripes. |
protected long |
diskExpiryThreadIntervalSeconds
The interval in seconds between runs of the disk expiry thread. |
protected boolean |
diskPersistent
For caches that overflow to disk, whether the disk cache persists between CacheManager instances. |
protected int |
diskSpoolBufferSizeMB
The size of the disk spool used to buffer writes |
protected java.lang.String |
diskStorePath
The path where the disk store is located |
protected boolean |
eternal
Sets whether elements are eternal. |
protected java.util.Set<CacheConfigurationListener> |
listeners
The listeners for this configuration. |
protected boolean |
loggingEnabled
Indicates whether logging is enabled or not. |
protected int |
maxElementsInMemory
the maximum objects to be held in the MemoryStore . |
protected int |
maxElementsOnDisk
the maximum objects to be held in the DiskStore . |
protected MemoryStoreEvictionPolicy |
memoryStoreEvictionPolicy
The policy used to evict elements from the MemoryStore . |
protected java.lang.String |
name
the name of the cache. |
protected boolean |
overflowToDisk
whether elements can overflow to disk when the in-memory cache has reached the set limit. |
protected TerracottaConfiguration |
terracottaConfiguration
The TerracottaConfiguration. |
protected long |
timeToIdleSeconds
the time to idle for an element before it expires. |
protected long |
timeToLiveSeconds
Sets the time to idle for an element before it expires. |
Constructor Summary | |
---|---|
CacheConfiguration(java.lang.String name,
int maxElementsInMemory)
Create a new cache configuration. |
Method Summary | |
---|---|
void |
addBootstrapCacheLoaderFactory(CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration factory)
Allows BeanHandler to add the CacheManagerEventListener to the configuration. |
void |
addCacheEventListenerFactory(CacheConfiguration.CacheEventListenerFactoryConfiguration factory)
Used by BeanUtils to add cacheEventListenerFactory elements to the cache configuration. |
void |
addCacheExceptionHandlerFactory(CacheConfiguration.CacheExceptionHandlerFactoryConfiguration factory)
Add the CacheExceptionHandlerFactory to the configuration. |
void |
addCacheExtensionFactory(CacheConfiguration.CacheExtensionFactoryConfiguration factory)
Used by BeanUtils to add cacheExtensionFactory elements to the cache configuration. |
void |
addCacheLoaderFactory(CacheConfiguration.CacheLoaderFactoryConfiguration factory)
Used by BeanUtils to add each cacheLoaderFactory to the cache configuration. |
void |
addCacheWriter(CacheWriterConfiguration cacheWriterConfiguration)
Allows BeanHandler to add the CacheWriterConfiguration to the configuration. |
boolean |
addConfigurationListener(CacheConfigurationListener listener)
Add a listener to this cache configuration |
void |
addTerracotta(TerracottaConfiguration terracottaConfiguration)
Allows BeanHandler to add the TerracottaConfiguration to the configuration. |
CacheConfiguration |
bootstrapCacheLoaderFactory(CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration factory)
|
CacheConfiguration |
cacheEventListenerFactory(CacheConfiguration.CacheEventListenerFactoryConfiguration factory)
|
CacheConfiguration |
cacheExceptionHandlerFactory(CacheConfiguration.CacheExceptionHandlerFactoryConfiguration factory)
|
CacheConfiguration |
cacheExtensionFactory(CacheConfiguration.CacheExtensionFactoryConfiguration factory)
|
CacheConfiguration |
cacheLoaderFactory(CacheConfiguration.CacheLoaderFactoryConfiguration factory)
|
CacheConfiguration |
cacheWriter(CacheWriterConfiguration cacheWriterConfiguration)
|
CacheConfiguration |
clearOnFlush(boolean clearOnFlush)
Builder which sets whether the MemoryStore should be cleared when flush() is called on the cache - true by default. |
CacheConfiguration |
clone()
Clones this object, following the usual contract. |
CacheConfiguration |
diskAccessStripes(int stripes)
Builder which sets the number of disk stripes. |
CacheConfiguration |
diskExpiryThreadIntervalSeconds(long diskExpiryThreadIntervalSeconds)
Builder which sets the interval in seconds between runs of the disk expiry thread. |
CacheConfiguration |
diskPersistent(boolean diskPersistent)
Builder which sets whether the disk store persists between CacheManager instances. |
CacheConfiguration |
diskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
Builder which sets the disk spool size, which is used to buffer writes to the DiskStore. |
CacheConfiguration |
diskStorePath(java.lang.String diskStorePath)
Builder which sets the path that will be used for the disk store. |
CacheConfiguration |
eternal(boolean eternal)
Builder which sets whether elements are eternal. |
void |
freezeConfiguration()
Freeze this configuration. |
CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration |
getBootstrapCacheLoaderFactoryConfiguration()
Accessor |
java.util.List |
getCacheEventListenerConfigurations()
Accessor |
CacheConfiguration.CacheExceptionHandlerFactoryConfiguration |
getCacheExceptionHandlerFactoryConfiguration()
Accessor |
java.util.List |
getCacheExtensionConfigurations()
Accessor |
java.util.List |
getCacheLoaderConfigurations()
Accessor |
CacheWriterConfiguration |
getCacheWriterConfiguration()
Accessor |
int |
getDiskAccessStripes()
Accessor |
long |
getDiskExpiryThreadIntervalSeconds()
Accessor |
int |
getDiskSpoolBufferSizeMB()
Accessor |
java.lang.String |
getDiskStorePath()
Accessor |
int |
getMaxElementsInMemory()
Accessor |
int |
getMaxElementsOnDisk()
Accessor |
MemoryStoreEvictionPolicy |
getMemoryStoreEvictionPolicy()
Accessor |
java.lang.String |
getName()
Accessor |
boolean |
getStatistics()
Gets whether the cache's statistics will be enabled at startup |
TerracottaConfiguration |
getTerracottaConfiguration()
Accessor |
long |
getTimeToIdleSeconds()
Accessor |
long |
getTimeToLiveSeconds()
Accessor |
CacheConfiguration.TransactionalMode |
getTransactionalMode()
To what transactionalMode was the Cache set |
void |
internalSetCoherent(boolean coherent)
Intended for internal use only, and subject to change. |
void |
internalSetDiskCapacity(int capacity)
Intended for internal use only, and subject to change. |
void |
internalSetMemCapacity(int capacity)
Intended for internal use only, and subject to change. |
void |
internalSetTimeToIdle(long timeToIdle)
Intended for internal use only, and subject to change. |
void |
internalSetTimeToLive(long timeToLive)
Intended for internal use only, and subject to change. |
boolean |
isClearOnFlush()
Accessor |
boolean |
isDiskPersistent()
Accessor |
boolean |
isEternal()
Accessor |
boolean |
isFrozen()
|
boolean |
isLoggingEnabled()
Only used when cache is clustered with Terracotta |
boolean |
isOverflowToDisk()
Accessor |
boolean |
isTerracottaClustered()
Helper method to compute whether the cache is clustered or not |
boolean |
isTransactional()
Helper method to compute whether the cache is transactional or not |
CacheConfiguration |
loggingEnabled(boolean enable)
Builder to enable or disable logging for the cache This property can be modified dynamically while the cache is operating. |
CacheConfiguration |
maxElementsInMemory(int maxElementsInMemory)
Builder that sets the maximum objects to be held in memory (0 = no limit). |
CacheConfiguration |
maxElementsOnDisk(int maxElementsOnDisk)
Builder which sets the maximum number elements on Disk. |
CacheConfiguration |
memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy memoryStoreEvictionPolicy)
Builder which Sets the eviction policy. |
CacheConfiguration |
memoryStoreEvictionPolicy(java.lang.String memoryStoreEvictionPolicy)
Builder that sets the eviction policy. |
CacheConfiguration |
name(java.lang.String name)
Builder to set the name of the cache. |
CacheConfiguration |
overflowToDisk(boolean overflowToDisk)
Builder which sets whether elements can overflow to disk when the in-memory cache has reached the set limit. |
boolean |
removeConfigurationListener(CacheConfigurationListener listener)
Remove the supplied cache configuration listener. |
void |
setClearOnFlush(boolean clearOnFlush)
Sets whether the MemoryStore should be cleared when flush() is called on the cache - true by default. |
void |
setDiskAccessStripes(int stripes)
Sets the number of disk stripes. |
void |
setDiskExpiryThreadIntervalSeconds(long diskExpiryThreadIntervalSeconds)
Sets the interval in seconds between runs of the disk expiry thread. |
void |
setDiskPersistent(boolean diskPersistent)
Sets whether the disk store persists between CacheManager instances. |
void |
setDiskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
Sets the disk spool size, which is used to buffer writes to the DiskStore. |
void |
setDiskStorePath(java.lang.String diskStorePath)
Sets the path that will be used for the disk store. |
void |
setEternal(boolean eternal)
Sets whether elements are eternal. |
void |
setLoggingEnabled(boolean enable)
Enables or disables logging for the cache This property can be modified dynamically while the cache is operating. |
void |
setMaxElementsInMemory(int maxElementsInMemory)
Sets the maximum objects to be held in memory (0 = no limit). |
void |
setMaxElementsOnDisk(int maxElementsOnDisk)
Sets the maximum number elements on Disk. |
void |
setMemoryStoreEvictionPolicy(java.lang.String memoryStoreEvictionPolicy)
Sets the eviction policy. |
void |
setMemoryStoreEvictionPolicyFromObject(MemoryStoreEvictionPolicy memoryStoreEvictionPolicy)
Sets the eviction policy. |
void |
setName(java.lang.String name)
Sets the name of the cache. |
void |
setOverflowToDisk(boolean overflowToDisk)
Sets whether elements can overflow to disk when the in-memory cache has reached the set limit. |
void |
setStatistics(boolean enabled)
Sets whether the cache's statistics are enabled. |
void |
setTimeToIdleSeconds(long timeToIdleSeconds)
Sets the time to idle for an element before it expires. |
void |
setTimeToLiveSeconds(long timeToLiveSeconds)
Sets the time to idle for an element before it expires. |
void |
setTransactionalMode(java.lang.String transactionalMode)
Sets the transactionalMode |
CacheConfiguration |
statistics(boolean statistics)
Builder which sets whether the cache's statistics are enabled. |
CacheConfiguration |
terracotta(TerracottaConfiguration terracottaConfiguration)
|
CacheConfiguration |
timeToIdleSeconds(long timeToIdleSeconds)
Builder which sets the time to idle for an element before it expires. |
CacheConfiguration |
timeToLiveSeconds(long timeToLiveSeconds)
Builder which sets the time to idle for an element before it expires. |
CacheConfiguration |
transactionalMode(CacheConfiguration.TransactionalMode transactionalMode)
Builder which sets the transactionalMode |
CacheConfiguration |
transactionalMode(java.lang.String transactionalMode)
Builder which sets the transactionalMode |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_EXPIRY_THREAD_INTERVAL_SECONDS
public static final int DEFAULT_SPOOL_BUFFER_SIZE
public static final int DEFAULT_DISK_ACCESS_STRIPES
public static final MemoryStoreEvictionPolicy DEFAULT_MEMORY_STORE_EVICTION_POLICY
protected java.lang.String name
protected int maxElementsInMemory
MemoryStore
.
0
translates to no-limit.
protected int maxElementsOnDisk
DiskStore
.
0
translates to no-limit.
protected MemoryStoreEvictionPolicy memoryStoreEvictionPolicy
MemoryStore
.
This can be one of:
protected boolean clearOnFlush
flush()
is called on the cache - true by default.
protected boolean eternal
protected long timeToIdleSeconds
protected long timeToLiveSeconds
protected boolean overflowToDisk
protected boolean diskPersistent
protected java.lang.String diskStorePath
protected int diskSpoolBufferSizeMB
protected int diskAccessStripes
protected long diskExpiryThreadIntervalSeconds
protected boolean loggingEnabled
protected volatile java.util.List<CacheConfiguration.CacheEventListenerFactoryConfiguration> cacheEventListenerConfigurations
protected volatile java.util.List<CacheConfiguration.CacheExtensionFactoryConfiguration> cacheExtensionConfigurations
protected CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration bootstrapCacheLoaderFactoryConfiguration
protected CacheConfiguration.CacheExceptionHandlerFactoryConfiguration cacheExceptionHandlerFactoryConfiguration
protected TerracottaConfiguration terracottaConfiguration
protected CacheWriterConfiguration cacheWriterConfiguration
protected volatile java.util.List<CacheConfiguration.CacheLoaderFactoryConfiguration> cacheLoaderConfigurations
protected volatile java.util.Set<CacheConfigurationListener> listeners
Constructor Detail |
---|
public CacheConfiguration(java.lang.String name, int maxElementsInMemory)
name
- the name of the cache. Note that "default" is a reserved name for the defaultCache.maxElementsInMemory
- the maximum number of elements in memory, before they are evicted (0 == no limit)Method Detail |
---|
public CacheConfiguration clone()
clone
in class java.lang.Object
public final void setName(java.lang.String name)
name
- the cache name. This must be unique. The / character is illegal. The # character does not work with RMI replication.public final CacheConfiguration name(java.lang.String name)
name
- the cache name. This must be unique. The / character is illegal. The # character does not work with RMI replication.
setName(String)
public final void setLoggingEnabled(boolean enable)
enable
- If true, enables logging otherwise disables loggingpublic final CacheConfiguration loggingEnabled(boolean enable)
enable
- If true, enables logging otherwise disables logging
setLoggingEnabled(boolean)
public final void setMaxElementsInMemory(int maxElementsInMemory)
maxElementsInMemory
- The maximum number of elements in memory, before they are evicted (0 == no limit)public final CacheConfiguration maxElementsInMemory(int maxElementsInMemory)
maxElementsInMemory
- The maximum number of elements in memory, before they are evicted (0 == no limit)
public final void setMemoryStoreEvictionPolicy(java.lang.String memoryStoreEvictionPolicy)
memoryStoreEvictionPolicy
- a String representation of the policy. One of "LRU", "LFU" or "FIFO".public final CacheConfiguration memoryStoreEvictionPolicy(java.lang.String memoryStoreEvictionPolicy)
memoryStoreEvictionPolicy
- a String representation of the policy. One of "LRU", "LFU" or "FIFO".
setMemoryStoreEvictionPolicy(String)
public final void setMemoryStoreEvictionPolicyFromObject(MemoryStoreEvictionPolicy memoryStoreEvictionPolicy)
public final CacheConfiguration memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy memoryStoreEvictionPolicy)
setMemoryStoreEvictionPolicyFromObject(MemoryStoreEvictionPolicy)
public final void setClearOnFlush(boolean clearOnFlush)
flush()
is called on the cache - true by default.
clearOnFlush
- true to clear on flushpublic final CacheConfiguration clearOnFlush(boolean clearOnFlush)
flush()
is called on the cache - true by default.
clearOnFlush
- true to clear on flush
setClearOnFlush(boolean)
public final void setEternal(boolean eternal)
eternal
- true for eternalpublic final CacheConfiguration eternal(boolean eternal)
eternal
- true for eternal
setEternal(boolean)
public final void setTimeToIdleSeconds(long timeToIdleSeconds)
Element
This property can be modified dynamically while the cache is operating.
timeToIdleSeconds
- the default amount of time to live for an element from its last accessed or modified datepublic final CacheConfiguration timeToIdleSeconds(long timeToIdleSeconds)
Element
This property can be modified dynamically while the cache is operating.
timeToIdleSeconds
- the default amount of time to live for an element from its last accessed or modified date
setTimeToIdleSeconds(long)
public final void setTimeToLiveSeconds(long timeToLiveSeconds)
Element
This property can be modified dynamically while the cache is operating.
timeToLiveSeconds
- the default amount of time to live for an element from its creation datepublic final CacheConfiguration timeToLiveSeconds(long timeToLiveSeconds)
Element
This property can be modified dynamically while the cache is operating.
timeToLiveSeconds
- the default amount of time to live for an element from its creation date
setTimeToLiveSeconds(long)
public final void setOverflowToDisk(boolean overflowToDisk)
overflowToDisk
- whether to use the disk storepublic final CacheConfiguration overflowToDisk(boolean overflowToDisk)
overflowToDisk
- whether to use the disk store
setOverflowToDisk(boolean)
public final void setDiskPersistent(boolean diskPersistent)
overflowToDisk
.
diskPersistent
- whether to persist the cache to disk between JVM restartspublic final CacheConfiguration diskPersistent(boolean diskPersistent)
overflowToDisk
.
diskPersistent
- whether to persist the cache to disk between JVM restarts.
setDiskPersistent(boolean)
public final void setDiskStorePath(java.lang.String diskStorePath)
diskStorePath
- this parameter is ignored. CacheManager sets it using setter injection.public final CacheConfiguration diskStorePath(java.lang.String diskStorePath)
diskStorePath
- this parameter is ignored. CacheManager sets it using setter injection.
setDiskStorePath(String)
public void setDiskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
DEFAULT_SPOOL_BUFFER_SIZE
diskSpoolBufferSizeMB
- a positive numberpublic final CacheConfiguration diskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
DEFAULT_SPOOL_BUFFER_SIZE
diskSpoolBufferSizeMB
- a positive number
setDiskSpoolBufferSizeMB(int)
public void setDiskAccessStripes(int stripes)
stripes
- number of stripes (rounded up to a power-of-2)public final CacheConfiguration diskAccessStripes(int stripes)
setDiskAccessStripes(int)
public void setMaxElementsOnDisk(int maxElementsOnDisk)
maxElementsOnDisk
- the maximum number of Elements to allow on the disk. 0 means unlimited.public final CacheConfiguration maxElementsOnDisk(int maxElementsOnDisk)
maxElementsOnDisk
- the maximum number of Elements to allow on the disk. 0 means unlimited.
setMaxElementsOnDisk(int)
public final void setDiskExpiryThreadIntervalSeconds(long diskExpiryThreadIntervalSeconds)
public final CacheConfiguration diskExpiryThreadIntervalSeconds(long diskExpiryThreadIntervalSeconds)
setDiskExpiryThreadIntervalSeconds(long)
public void freezeConfiguration()
public boolean isFrozen()
public final void addCacheEventListenerFactory(CacheConfiguration.CacheEventListenerFactoryConfiguration factory)
public final CacheConfiguration cacheEventListenerFactory(CacheConfiguration.CacheEventListenerFactoryConfiguration factory)
addCacheEventListenerFactory(CacheEventListenerFactoryConfiguration)
public final void addCacheExtensionFactory(CacheConfiguration.CacheExtensionFactoryConfiguration factory)
public final CacheConfiguration cacheExtensionFactory(CacheConfiguration.CacheExtensionFactoryConfiguration factory)
addCacheExtensionFactory(CacheExtensionFactoryConfiguration)
public final void addBootstrapCacheLoaderFactory(CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration factory)
public final CacheConfiguration bootstrapCacheLoaderFactory(CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration factory)
addBootstrapCacheLoaderFactory(BootstrapCacheLoaderFactoryConfiguration)
public final void addCacheExceptionHandlerFactory(CacheConfiguration.CacheExceptionHandlerFactoryConfiguration factory)
ConfigurationHelper
is used, for example through
CacheManager
.
public final CacheConfiguration cacheExceptionHandlerFactory(CacheConfiguration.CacheExceptionHandlerFactoryConfiguration factory)
addCacheExceptionHandlerFactory(CacheExceptionHandlerFactoryConfiguration)
public final void addCacheLoaderFactory(CacheConfiguration.CacheLoaderFactoryConfiguration factory)
factory
- public final CacheConfiguration cacheLoaderFactory(CacheConfiguration.CacheLoaderFactoryConfiguration factory)
addCacheLoaderFactory(CacheLoaderFactoryConfiguration)
public final void addTerracotta(TerracottaConfiguration terracottaConfiguration)
public final CacheConfiguration terracotta(TerracottaConfiguration terracottaConfiguration)
addTerracotta(TerracottaConfiguration)
public final void addCacheWriter(CacheWriterConfiguration cacheWriterConfiguration)
public final CacheConfiguration cacheWriter(CacheWriterConfiguration cacheWriterConfiguration)
addCacheWriter(CacheWriterConfiguration)
public final void setTransactionalMode(java.lang.String transactionalMode)
transactionalMode
- OFF or XApublic final CacheConfiguration transactionalMode(java.lang.String transactionalMode)
transactionalMode
- one of OFF or XA
setTransactionalMode(String)
public final CacheConfiguration transactionalMode(CacheConfiguration.TransactionalMode transactionalMode)
transactionalMode
- one of OFF or XA enum values
setTransactionalMode(String)
public final void setStatistics(boolean enabled)
public final CacheConfiguration statistics(boolean statistics)
setStatistics(boolean)
public final boolean getStatistics()
public java.lang.String getName()
public int getMaxElementsInMemory()
public int getMaxElementsOnDisk()
public MemoryStoreEvictionPolicy getMemoryStoreEvictionPolicy()
public boolean isClearOnFlush()
public boolean isEternal()
public long getTimeToIdleSeconds()
public long getTimeToLiveSeconds()
public boolean isOverflowToDisk()
public boolean isDiskPersistent()
public java.lang.String getDiskStorePath()
public int getDiskSpoolBufferSizeMB()
public long getDiskExpiryThreadIntervalSeconds()
public int getDiskAccessStripes()
public boolean isLoggingEnabled()
public java.util.List getCacheEventListenerConfigurations()
public java.util.List getCacheExtensionConfigurations()
public java.util.List getCacheLoaderConfigurations()
public CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration getBootstrapCacheLoaderFactoryConfiguration()
public CacheConfiguration.CacheExceptionHandlerFactoryConfiguration getCacheExceptionHandlerFactoryConfiguration()
public TerracottaConfiguration getTerracottaConfiguration()
public CacheWriterConfiguration getCacheWriterConfiguration()
public boolean isTerracottaClustered()
clustered="true"
public final CacheConfiguration.TransactionalMode getTransactionalMode()
public boolean isTransactional()
public boolean addConfigurationListener(CacheConfigurationListener listener)
listener
- listener instance to add
public boolean removeConfigurationListener(CacheConfigurationListener listener)
listener
- listener to remove
public void internalSetTimeToIdle(long timeToIdle)
public void internalSetTimeToLive(long timeToLive)
public void internalSetMemCapacity(int capacity)
public void internalSetDiskCapacity(int capacity)
public void internalSetCoherent(boolean coherent)
coherent
- true for coherent
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |