|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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));
Rather than proliferation of new constructors as new versions of Ehcache come out, it intended to add the new configuration to this
class.
Another way to set configuration is declaratively in the ehcache.xml
configuration file.
e.g.
<cache name="testCache1"
maxEntriesLocalHeap="10000"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="10"
overflowToDisk="true"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="120"
maxEntriesLocalDisk="10000"
/>
Nested Class Summary | |
---|---|
static class |
CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration
Configuration for the BootstrapCacheLoaderFactoryConfiguration. |
static class |
CacheConfiguration.CacheDecoratorFactoryConfiguration
Configuration for the CacheDecoratorFactoryConfiguration. |
static class |
CacheConfiguration.CacheEventListenerFactoryConfiguration
Configuration for the CacheEventListenerFactory. |
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 List<CacheConfiguration.CacheDecoratorFactoryConfiguration> |
cacheDecoratorConfigurations
The cache decorator factories added by BeanUtils. |
protected List<CacheConfiguration.CacheEventListenerFactoryConfiguration> |
cacheEventListenerConfigurations
The event listener factories added by BeanUtils. |
protected CacheConfiguration.CacheExceptionHandlerFactoryConfiguration |
cacheExceptionHandlerFactoryConfiguration
The CacheExceptionHandlerFactoryConfiguration. |
protected List<CacheConfiguration.CacheExtensionFactoryConfiguration> |
cacheExtensionConfigurations
The cache extension factories added by BeanUtils. |
protected List<CacheConfiguration.CacheLoaderFactoryConfiguration> |
cacheLoaderConfigurations
The cache loader factories added by BeanUtils. |
protected long |
cacheLoaderTimeoutMillis
Timeout in milliseconds for CacheLoader related calls |
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 CacheWriterConfiguration |
DEFAULT_CACHE_WRITER_CONFIGURATION
The default cacheWriterConfiguration |
static boolean |
DEFAULT_CLEAR_ON_FLUSH
Default value for clearOnFlush |
static boolean |
DEFAULT_COPY_ON_READ
Default value for copyOnRead |
static boolean |
DEFAULT_COPY_ON_WRITE
Default value for copyOnRead |
static CopyStrategyConfiguration |
DEFAULT_COPY_STRATEGY_CONFIGURATION
Default copyStrategyConfiguration |
static int |
DEFAULT_DISK_ACCESS_STRIPES
Default number of diskAccessStripes. |
static boolean |
DEFAULT_DISK_PERSISTENT
Deprecated. The diskPersistent attribute has been replaced with persistence(PersistenceConfiguration) . |
static boolean |
DEFAULT_ETERNAL_VALUE
Default eternal value |
static long |
DEFAULT_EXPIRY_THREAD_INTERVAL_SECONDS
The default interval between runs of the expiry thread. |
static boolean |
DEFAULT_LOGGING
Logging is off by default. |
static long |
DEFAULT_MAX_BYTES_OFF_HEAP
Default maxBytesOffHeap value |
static long |
DEFAULT_MAX_BYTES_ON_DISK
Default maxBytesOnDisk value |
static long |
DEFAULT_MAX_BYTES_ON_HEAP
Default maxBytesOnHeap value |
static int |
DEFAULT_MAX_ELEMENTS_ON_DISK
Default value for maxElementsOnDisk |
static long |
DEFAULT_MAX_ENTRIES_IN_CACHE
Default value for maxEntriesInCache |
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. |
static boolean |
DEFAULT_STATISTICS
Default value for statistics |
static CacheConfiguration.TransactionalMode |
DEFAULT_TRANSACTIONAL_MODE
Default value for transactionalMode |
static long |
DEFAULT_TTI
Default value for tti |
static long |
DEFAULT_TTL
Default value for ttl |
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
Deprecated. The diskPersistent attribute has been replaced with persistence(PersistenceConfiguration) . |
protected int |
diskSpoolBufferSizeMB
The size of the disk spool used to buffer writes |
protected boolean |
eternal
Sets whether elements are eternal. |
protected Set<CacheConfigurationListener> |
listeners
The listeners for this configuration. |
protected boolean |
logging
Indicates whether logging is enabled or not. |
protected int |
maxElementsOnDisk
the maximum objects to be held in the DiskStore . |
protected long |
maxEntriesInCache
the maximum entries to be held in the cache |
protected Integer |
maxEntriesLocalHeap
the maximum objects to be held in the MemoryStore . |
protected MemoryStoreEvictionPolicy |
memoryStoreEvictionPolicy
The policy used to evict elements from the MemoryStore . |
protected String |
name
the name of the cache. |
protected Boolean |
overflowToDisk
Deprecated. The overflowToDisk attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP . |
protected Boolean |
overflowToOffHeap
whether elements can overflow to off heap memory when the in-memory cache has reached the set limit. |
protected PinningConfiguration |
pinningConfiguration
The PinningConfiguration. |
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()
Default constructor. |
|
CacheConfiguration(String name,
int maxEntriesLocalHeap)
Create a new cache configuration. |
Method Summary | |
---|---|
void |
addBootstrapCacheLoaderFactory(CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration factory)
Allows BeanHandler to add the CacheManagerEventListener to the configuration. |
void |
addCacheDecoratorFactory(CacheConfiguration.CacheDecoratorFactoryConfiguration factory)
Used by BeanUtils to add each cacheDecoratorFactory to the cache 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 |
addCopyStrategy(CopyStrategyConfiguration copyStrategyConfiguration)
Sets the CopyStrategyConfiguration for this cache |
boolean |
addDynamicSearchListener(DynamicSearchListener listener)
Add a dynamic extractor configuration listener |
void |
addElementValueComparator(ElementValueComparatorConfiguration elementValueComparatorConfiguration)
Sets the ElementValueComparatorConfiguration for this cache The default configuration will setup a DefaultElementValueComparator |
void |
addPersistence(PersistenceConfiguration persistenceConfiguration)
Sets the PersistenceConfiguration for this cache. |
void |
addPinning(PinningConfiguration pinningConfiguration)
Allows BeanHandler to add the PinningConfiguration to the configuration. |
void |
addSearchable(Searchable searchable)
Add configuration to make this cache searchable |
void |
addSizeOfPolicy(SizeOfPolicyConfiguration sizeOfPolicyConfiguration)
Sets the SizeOfPolicyConfiguration for this cache. |
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 |
copyOnRead(boolean copyOnRead)
Whether the Cache should copy elements it returns |
CacheConfiguration |
copyOnWrite(boolean copyOnWrite)
Whether the Cache should copy elements it gets |
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)
Deprecated. The diskPersistent attribute has been replaced with persistence(PersistenceConfiguration) . |
CacheConfiguration |
diskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
Builder which sets the disk spool size, which is used to buffer writes to the DiskStore. |
CacheConfiguration |
dynamicAttributeExtractor(DynamicAttributesExtractor extractor)
Sets dynamic search attributes extractor |
CacheConfiguration |
eternal(boolean eternal)
Builder which sets whether elements are eternal. |
void |
freezeConfiguration()
Freeze this configuration. |
CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration |
getBootstrapCacheLoaderFactoryConfiguration()
Accessor |
List<CacheConfiguration.CacheDecoratorFactoryConfiguration> |
getCacheDecoratorConfigurations()
Accessor |
List |
getCacheEventListenerConfigurations()
Accessor |
CacheConfiguration.CacheExceptionHandlerFactoryConfiguration |
getCacheExceptionHandlerFactoryConfiguration()
Accessor |
List |
getCacheExtensionConfigurations()
Accessor |
List |
getCacheLoaderConfigurations()
Accessor |
long |
getCacheLoaderTimeoutMillis()
Accessor |
CacheWriterConfiguration |
getCacheWriterConfiguration()
Accessor |
ClassLoader |
getClassLoader()
|
ReadWriteCopyStrategy<Element> |
getCopyStrategy()
Getter to the configured ReadWriteCopyStrategy. |
CopyStrategyConfiguration |
getCopyStrategyConfiguration()
Returns the copyStrategyConfiguration |
int |
getDiskAccessStripes()
Accessor |
long |
getDiskExpiryThreadIntervalSeconds()
Accessor |
int |
getDiskSpoolBufferSizeMB()
Accessor |
DynamicAttributesExtractor |
getDynamicExtractor()
Accessor |
ElementValueComparatorConfiguration |
getElementValueComparatorConfiguration()
Returns the elementComparatorConfiguration |
boolean |
getLogging()
Only used when cache is clustered with Terracotta |
long |
getMaxBytesLocalDisk()
The maximum amount of bytes the cache should occupy on disk |
String |
getMaxBytesLocalDiskAsString()
The string form of the maximum amount of bytes the cache should occupy on disk |
Integer |
getMaxBytesLocalDiskPercentage()
Getter for maximum bytes on disk expressed as a percentage |
long |
getMaxBytesLocalHeap()
The maximum amount of bytes the cache should occupy on heap |
String |
getMaxBytesLocalHeapAsString()
The string form of the maximum amount of bytes the cache should occupy on heap |
Integer |
getMaxBytesLocalHeapPercentage()
Getter for maximum bytes on heap expressed as a percentage |
long |
getMaxBytesLocalOffHeap()
The maximum amount of bytes the cache should occupy off heap |
String |
getMaxBytesLocalOffHeapAsString()
The string form of the maximum amount of bytes the cache should occupy off heap |
Integer |
getMaxBytesLocalOffHeapPercentage()
Getter for maximum bytes off heap expressed as a percentage |
int |
getMaxElementsInMemory()
Deprecated. use getMaxEntriesLocalHeap() |
int |
getMaxElementsOnDisk()
Deprecated. use getMaxEntriesLocalDisk() for unclustered caches and getMaxEntriesInCache() for clustered caches. |
long |
getMaxEntriesInCache()
Accessor |
long |
getMaxEntriesLocalDisk()
Configured maximum number of entries for the local disk store. |
long |
getMaxEntriesLocalHeap()
Configured maximum number of entries for the local memory heap. |
String |
getMaxMemoryOffHeap()
Deprecated. See getMaxBytesLocalOffHeapAsString() |
long |
getMaxMemoryOffHeapInBytes()
Deprecated. getMaxBytesLocalOffHeap() |
MemoryStoreEvictionPolicy |
getMemoryStoreEvictionPolicy()
Accessor |
String |
getName()
Accessor |
PersistenceConfiguration |
getPersistenceConfiguration()
Accessor |
PinningConfiguration |
getPinningConfiguration()
Accessor |
Searchable |
getSearchable()
Get the search configuration for this cache (if any) |
Map<String,SearchAttribute> |
getSearchAttributes()
Get the defined search attributes indexed by attribute name |
SizeOfPolicyConfiguration |
getSizeOfPolicyConfiguration()
Accessor |
boolean |
getStatistics()
Gets whether the cache's statistics will be enabled at startup |
TerracottaConfiguration |
getTerracottaConfiguration()
Accessor |
TerracottaConfiguration.Consistency |
getTerracottaConsistency()
Accessor |
long |
getTimeToIdleSeconds()
Accessor |
long |
getTimeToLiveSeconds()
Accessor |
CacheConfiguration.TransactionalMode |
getTransactionalMode()
To what transactionalMode was the Cache set |
void |
internalSetDiskCapacity(int capacity)
Intended for internal use only, and subject to change. |
void |
internalSetEternal(boolean eternal)
Intended for internal use only, and subject to change. |
void |
internalSetLogging(boolean logging)
Intended for internal use only, and subject to change. |
void |
internalSetMaxBytesLocalOffheap(long maxBytesLocalOffheap)
Intended for internal use only, and subject to change. |
void |
internalSetMaxEntriesInCache(int entries)
Intended for internal use only, and subject to change. |
void |
internalSetMemCapacity(int capacity)
Intended for internal use only, and subject to change. |
void |
internalSetMemCapacityInBytes(long capacity)
Intended for internal use only, and subject to change. |
void |
internalSetOverflowToOffheap(boolean overflowToOffHeap)
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 |
isCopyOnRead()
Whether the Cache should copy elements it returns |
boolean |
isCopyOnWrite()
Whether the Cache should copy elements it gets |
boolean |
isCountBasedTuned()
Whether this cache is Count based |
boolean |
isDiskPersistent()
Deprecated. The diskPersistent attribute has been replaced with persistence(PersistenceConfiguration) . |
boolean |
isEternal()
Accessor |
boolean |
isFrozen()
|
boolean |
isLocalTransactional()
Helper method to compute whether the cache is local transactional or not |
boolean |
isMaxBytesLocalDiskPercentageSet()
Checks whether the user explicitly set the maxBytesOnDiskPercentage |
boolean |
isMaxBytesLocalHeapPercentageSet()
Checks whether the user explicitly set the maxBytesOnHeapPercentage |
boolean |
isMaxBytesLocalOffHeapPercentageSet()
Checks whether the user explicitly set the maxBytesOffHeapPercentage |
boolean |
isOverflowToDisk()
Deprecated. The overflowToDisk attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP . |
boolean |
isOverflowToOffHeap()
Accessor |
boolean |
isOverflowToOffHeapSet()
Checks whether the overflowing to off heap behavior was explicitly set |
boolean |
isSearchable()
Accessor |
boolean |
isTerracottaClustered()
Helper method to compute whether the cache is clustered or not |
boolean |
isXaStrictTransactional()
Helper method to compute whether the cache is XA transactional or not |
boolean |
isXaTransactional()
Helper method to compute whether the cache is local_jta transactional or not |
CacheConfiguration |
logging(boolean enable)
Builder to enable or disable logging for the cache This property can be modified dynamically while the cache is operating. |
CacheConfiguration |
maxBytesLocalDisk(long amount,
MemoryUnit memoryUnit)
Sets the maxOnDisk size This property can be modified dynamically while the cache is operating. |
CacheConfiguration |
maxBytesLocalHeap(long amount,
MemoryUnit memoryUnit)
Sets the maxOnHeap size |
CacheConfiguration |
maxBytesLocalOffHeap(long amount,
MemoryUnit memoryUnit)
Sets the maxOffHeap tier size Changes to this property once the cache is operating will have no effect. |
CacheConfiguration |
maxElementsInMemory(int maxElementsInMemory)
Deprecated. use maxEntriesLocalHeap(int) |
CacheConfiguration |
maxElementsOnDisk(int maxElementsOnDisk)
Deprecated. use maxEntriesLocalDisk(int) for unclustered caches and maxEntriesInCache(long) for clustered caches. |
CacheConfiguration |
maxEntriesInCache(long maxEntriesInCache)
Builder which sets the maximum number entries in cache. |
CacheConfiguration |
maxEntriesLocalDisk(int maxElementsOnDisk)
Builder which sets the maximum number elements on Disk. |
CacheConfiguration |
maxEntriesLocalHeap(int maxElementsInMemory)
Builder that sets the maximum objects to be held in memory (0 = no limit). |
CacheConfiguration |
maxMemoryOffHeap(String maxMemoryOffHeap)
Deprecated. See maxBytesLocalOffHeap(long, net.sf.ehcache.config.MemoryUnit) |
CacheConfiguration |
memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy memoryStoreEvictionPolicy)
Builder which Sets the eviction policy. |
CacheConfiguration |
memoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
Builder that sets the eviction policy. |
CacheConfiguration |
name(String name)
Builder to set the name of the cache. |
CacheConfiguration |
overflowToDisk(boolean overflowToDisk)
Deprecated. The overflowToDisk attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP . |
CacheConfiguration |
overflowToOffHeap(boolean overflowToOffHeap)
Builder to enable or disable offheap store for the cache. |
CacheConfiguration |
persistence(PersistenceConfiguration persistenceConfiguration)
Builder to set the PersistenceConfiguration for this cache. |
CacheConfiguration |
pinning(PinningConfiguration pinningConfiguration)
|
boolean |
removeConfigurationListener(CacheConfigurationListener listener)
Remove the supplied cache configuration listener. |
CacheConfiguration |
searchable(Searchable searchable)
|
void |
setCacheLoaderTimeoutMillis(long cacheLoaderTimeoutMillis)
Sets the timeout for CacheLoader execution (0 = no timeout). |
void |
setClassLoader(ClassLoader classLoader)
|
void |
setClearOnFlush(boolean clearOnFlush)
Sets whether the MemoryStore should be cleared when flush() is called on the cache - true by default. |
void |
setCopyOnRead(boolean copyOnRead)
Whether the Cache should copy elements it returns |
void |
setCopyOnWrite(boolean copyOnWrite)
Whether the Cache should copy elements it gets |
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)
Deprecated. The diskPersistent attribute has been replaced with persistence(PersistenceConfiguration) . |
void |
setDiskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
Sets the disk spool size, which is used to buffer writes to the DiskStore. |
void |
setDynamicAttributesExtractor(DynamicAttributesExtractor extractor)
Sets dynamic search attributes extractor |
void |
setEternal(boolean eternal)
Sets whether elements are eternal. |
void |
setLogging(boolean enable)
Enables or disables logging for the cache This property can be modified dynamically while the cache is operating. |
void |
setMaxBytesLocalDisk(Long maxBytesDisk)
Sets the maximum amount of bytes the cache being configured will use on the OnDisk tier This property can be modified dynamically while the cache is operating. |
void |
setMaxBytesLocalDisk(String maxBytesDisk)
Setter for maxBytesOnDisk as a String. |
void |
setMaxBytesLocalHeap(Long maxBytesHeap)
Setter for maxBytesLocalHeap in bytes This property can be modified dynamically while the cache is operating. |
void |
setMaxBytesLocalHeap(String maxBytesHeap)
Setter for maxBytesLocalHeap as a String. |
void |
setMaxBytesLocalOffHeap(Long maxBytesOffHeap)
Sets the maximum amount of bytes the cache being configured will use on the OffHeap tier Changes to this property once the cache is operating will have no effect. |
void |
setMaxBytesLocalOffHeap(String maxBytesOffHeap)
Setter for maximum bytes off heap as a String. |
void |
setMaxElementsInMemory(int maxElementsInMemory)
Deprecated. use setMaxEntriesLocalHeap(long) |
void |
setMaxElementsOnDisk(int maxElementsOnDisk)
Deprecated. use setMaxEntriesLocalDisk(long) for unclustered caches and setMaxEntriesInCache(long) for clustered caches. |
void |
setMaxEntriesInCache(long maxEntriesInCache)
Sets the maximum number of entries in the cache. |
void |
setMaxEntriesLocalDisk(long maxEntriesLocalDisk)
Sets the maximum number elements on Disk. |
void |
setMaxEntriesLocalHeap(long maxEntriesLocalHeap)
Sets the maximum objects to be held in local heap memory (0 = no limit). |
void |
setMaxMemoryOffHeap(String maxMemoryOffHeap)
Deprecated. See setMaxBytesLocalOffHeap(java.lang.String) |
void |
setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
Sets the eviction policy. |
void |
setMemoryStoreEvictionPolicyFromObject(MemoryStoreEvictionPolicy memoryStoreEvictionPolicy)
Sets the eviction policy. |
void |
setName(String name)
Sets the name of the cache. |
void |
setOverflowToDisk(boolean overflowToDisk)
Deprecated. The overflowToDisk attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP . |
void |
setOverflowToOffHeap(boolean overflowToOffHeap)
Enables or disables offheap store for the cache. |
void |
setStatistics(boolean enabled)
Deprecated. |
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(String transactionalMode)
Sets the transactionalMode |
void |
setupFor(CacheManager cacheManager)
Sets up the CacheConfiguration for runtime consumption, also registers this cache configuration with the cache manager's configuration |
void |
setupFor(CacheManager cacheManager,
boolean register,
String parentCache)
Sets up the CacheConfiguration for runtime consumption |
CacheConfiguration |
sizeOfPolicy(SizeOfPolicyConfiguration sizeOfPolicyConfiguration)
Builder to set the SizeOfPolicyConfiguration for this cache. |
CacheConfiguration |
statistics(boolean statistics)
Deprecated. |
CacheConfiguration |
terracotta(TerracottaConfiguration terracottaConfiguration)
|
CacheConfiguration |
timeoutMillis(long timeoutMillis)
Builder that sets the timeout for CacheLoader execution (0 = no timeout). |
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(String transactionalMode)
Builder which sets the transactionalMode |
Collection<ConfigError> |
validate(Configuration configuration)
Validates the configuration |
void |
validateCompleteConfiguration()
Used to validate what should be a complete Cache Configuration. |
void |
validateConfiguration()
Used to validate a Cache Configuration. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_CLEAR_ON_FLUSH
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 boolean DEFAULT_LOGGING
public static final MemoryStoreEvictionPolicy DEFAULT_MEMORY_STORE_EVICTION_POLICY
public static final CacheWriterConfiguration DEFAULT_CACHE_WRITER_CONFIGURATION
public static final boolean DEFAULT_COPY_ON_READ
public static final boolean DEFAULT_COPY_ON_WRITE
public static final long DEFAULT_TTL
public static final long DEFAULT_TTI
public static final int DEFAULT_MAX_ELEMENTS_ON_DISK
public static final long DEFAULT_MAX_ENTRIES_IN_CACHE
public static final CacheConfiguration.TransactionalMode DEFAULT_TRANSACTIONAL_MODE
public static final boolean DEFAULT_STATISTICS
@Deprecated public static final boolean DEFAULT_DISK_PERSISTENT
diskPersistent
attribute has been replaced with persistence(PersistenceConfiguration)
.
public static final CopyStrategyConfiguration DEFAULT_COPY_STRATEGY_CONFIGURATION
public static final long DEFAULT_MAX_BYTES_ON_HEAP
public static final long DEFAULT_MAX_BYTES_OFF_HEAP
public static final long DEFAULT_MAX_BYTES_ON_DISK
public static final boolean DEFAULT_ETERNAL_VALUE
protected volatile String name
protected volatile long cacheLoaderTimeoutMillis
protected volatile Integer maxEntriesLocalHeap
MemoryStore
.
0
translates to no-limit.
protected volatile int maxElementsOnDisk
DiskStore
.
0
translates to no-limit.
protected volatile long maxEntriesInCache
protected volatile MemoryStoreEvictionPolicy memoryStoreEvictionPolicy
MemoryStore
.
This can be one of:
protected volatile boolean clearOnFlush
flush()
is called on the cache - true by default.
protected volatile boolean eternal
protected volatile long timeToIdleSeconds
protected volatile long timeToLiveSeconds
@Deprecated protected volatile Boolean overflowToDisk
overflowToDisk
attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP
.
@Deprecated protected volatile Boolean diskPersistent
diskPersistent
attribute has been replaced with persistence(PersistenceConfiguration)
.
protected volatile int diskSpoolBufferSizeMB
protected volatile int diskAccessStripes
protected volatile long diskExpiryThreadIntervalSeconds
protected volatile boolean logging
protected volatile Boolean overflowToOffHeap
protected volatile List<CacheConfiguration.CacheEventListenerFactoryConfiguration> cacheEventListenerConfigurations
protected volatile List<CacheConfiguration.CacheExtensionFactoryConfiguration> cacheExtensionConfigurations
protected CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration bootstrapCacheLoaderFactoryConfiguration
protected CacheConfiguration.CacheExceptionHandlerFactoryConfiguration cacheExceptionHandlerFactoryConfiguration
protected TerracottaConfiguration terracottaConfiguration
protected volatile PinningConfiguration pinningConfiguration
protected CacheWriterConfiguration cacheWriterConfiguration
protected volatile List<CacheConfiguration.CacheLoaderFactoryConfiguration> cacheLoaderConfigurations
protected volatile List<CacheConfiguration.CacheDecoratorFactoryConfiguration> cacheDecoratorConfigurations
protected volatile Set<CacheConfigurationListener> listeners
Constructor Detail |
---|
public CacheConfiguration()
validateConfiguration()
to check your configuration.
validateCompleteConfiguration()
public CacheConfiguration(String name, int maxEntriesLocalHeap)
validateConfiguration()
to check your configuration.
name
- the name of the cache. Note that "default" is a reserved name for the defaultCache.maxEntriesLocalHeap
- the maximum number of elements in memory, before they are evicted (0 == no limit)validateCompleteConfiguration()
Method Detail |
---|
public CacheConfiguration clone()
clone
in class Object
public final void setName(String name)
ObjectName
rules for unquoted value.
This means the following characters are illegal: ',', '=', ':', '"', '*' and '?'.
name
- the cache name. This must be unique.public final CacheConfiguration name(String name)
ObjectName
rules for unquoted value.
This means the following characters are illegal: ',', '=', ':', '"', '*' and '?'.
name
- the cache name. This must be unique.
setName(String)
public final void setLogging(boolean enable)
enable
- If true, enables logging otherwise disables loggingpublic final void setOverflowToOffHeap(boolean overflowToOffHeap)
overflowToOffHeap
- If true, enables offheap store otherwise disables it.public CacheConfiguration overflowToOffHeap(boolean overflowToOffHeap)
overflowToOffHeap
- If true, enables offheap store otherwise disables it.
setOverflowToOffHeap(boolean)
public void addSizeOfPolicy(SizeOfPolicyConfiguration sizeOfPolicyConfiguration)
sizeOfPolicyConfiguration
- the SizeOfPolicy Configurationpublic CacheConfiguration sizeOfPolicy(SizeOfPolicyConfiguration sizeOfPolicyConfiguration)
sizeOfPolicyConfiguration
- the SizeOfPolicy Configuration
addSizeOfPolicy(SizeOfPolicyConfiguration)
public void addPersistence(PersistenceConfiguration persistenceConfiguration)
persistenceConfiguration
- the Persistence Configurationpublic CacheConfiguration persistence(PersistenceConfiguration persistenceConfiguration)
persistenceConfiguration
- the Persistence Configuration
addPersistence(PersistenceConfiguration)
@Deprecated public final void setMaxMemoryOffHeap(String maxMemoryOffHeap)
setMaxBytesLocalOffHeap(java.lang.String)
maxMemoryOffHeap
- the max off heap memory size allocated for this cache.@Deprecated public CacheConfiguration maxMemoryOffHeap(String maxMemoryOffHeap)
maxBytesLocalOffHeap(long, net.sf.ehcache.config.MemoryUnit)
maxMemoryOffHeap
- the max off heap memory size allocated for this cache.
public final CacheConfiguration logging(boolean enable)
enable
- If true, enables logging otherwise disables logging
setLogging(boolean)
@Deprecated public final void setMaxElementsInMemory(int maxElementsInMemory)
setMaxEntriesLocalHeap(long)
maxElementsInMemory
- The maximum number of elements in memory, before they are evicted (0 == no limit)public final void setMaxEntriesLocalHeap(long maxEntriesLocalHeap)
maxEntriesLocalHeap
- The maximum number of elements in memory, before they are evicted (0 == no limit)@Deprecated public final CacheConfiguration maxElementsInMemory(int maxElementsInMemory)
maxEntriesLocalHeap(int)
maxElementsInMemory
- The maximum number of elements in memory, before they are evicted (0 == no limit)
public final CacheConfiguration maxEntriesLocalHeap(int maxElementsInMemory)
maxElementsInMemory
- The maximum number of elements in memory, before they are evicted (0 == no limit)
public final void setCacheLoaderTimeoutMillis(long cacheLoaderTimeoutMillis)
cacheLoaderTimeoutMillis
- the timeout in milliseconds.public CacheConfiguration timeoutMillis(long timeoutMillis)
timeoutMillis
- the timeout in milliseconds.
public final void setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
memoryStoreEvictionPolicy
- a String representation of the policy. One of "LRU", "LFU" or "FIFO".public final CacheConfiguration memoryStoreEvictionPolicy(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)
@Deprecated public final void setOverflowToDisk(boolean overflowToDisk)
overflowToDisk
attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP
.
overflowToDisk
- whether to use the disk store@Deprecated public final CacheConfiguration overflowToDisk(boolean overflowToDisk)
overflowToDisk
attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP
.
overflowToDisk
- whether to use the disk store
setOverflowToDisk(boolean)
@Deprecated public final void setDiskPersistent(boolean diskPersistent)
diskPersistent
attribute has been replaced with persistence(PersistenceConfiguration)
.
overflowToDisk
.
diskPersistent
- whether to persist the cache to disk between JVM restarts@Deprecated public final CacheConfiguration diskPersistent(boolean diskPersistent)
diskPersistent
attribute has been replaced with persistence(PersistenceConfiguration)
.
overflowToDisk
.
diskPersistent
- whether to persist the cache to disk between JVM restarts.
setDiskPersistent(boolean)
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)
setMaxEntriesLocalDisk(long)
for unclustered caches and setMaxEntriesInCache(long)
for clustered caches.
maxElementsOnDisk
- the maximum number of Elements to allow on the disk. 0 means unlimited.public void setMaxEntriesInCache(long maxEntriesInCache)
maxEntriesInCache == 0
means no capacity based eviction, but resource based eviction can happen.maxEntriesInCache > 0
means both capacity based and resource based eviction can happen
maxEntriesInCache
- maximum number of entries in cachepublic void setMaxEntriesLocalDisk(long maxEntriesLocalDisk)
maxEntriesLocalDisk
- the maximum number of Elements to allow on the disk. 0 means unlimited.public final CacheConfiguration maxElementsOnDisk(int maxElementsOnDisk)
maxEntriesLocalDisk(int)
for unclustered caches and maxEntriesInCache(long)
for clustered caches.
maxElementsOnDisk
- the maximum number of Elements to allow on the disk. 0 means unlimited.
setMaxElementsOnDisk(int)
public final CacheConfiguration maxEntriesInCache(long maxEntriesInCache)
maxEntriesInCache
- the maximum number of entries to allow in the cache.
setMaxEntriesInCache(long)
public final CacheConfiguration maxEntriesLocalDisk(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 ReadWriteCopyStrategy<Element> getCopyStrategy()
ReadWriteCopyStrategy
for instance for this cachepublic CacheConfiguration copyOnRead(boolean copyOnRead)
copyOnRead
- true, if copyOnReadpublic boolean isCopyOnRead()
public void setCopyOnRead(boolean copyOnRead)
copyOnRead
- true, if copyOnReadpublic CacheConfiguration copyOnWrite(boolean copyOnWrite)
copyOnWrite
- true, if copyOnWritepublic boolean isCopyOnWrite()
public void setCopyOnWrite(boolean copyOnWrite)
copyOnWrite
- true, if copyOnWritepublic void addCopyStrategy(CopyStrategyConfiguration copyStrategyConfiguration)
copyStrategyConfiguration
- the CopyStrategy Configurationpublic void addElementValueComparator(ElementValueComparatorConfiguration elementValueComparatorConfiguration)
DefaultElementValueComparator
elementValueComparatorConfiguration
- the ElementComparator Configurationpublic final void addSearchable(Searchable searchable)
searchable
- search config to addpublic long getMaxBytesLocalHeap()
public void setMaxBytesLocalHeap(String maxBytesHeap)
maxBytesHeap
- String representation of the size, can be relative (in %)public void setMaxBytesLocalHeap(Long maxBytesHeap)
maxBytesHeap
- max bytes in heap in bytespublic CacheConfiguration maxBytesLocalHeap(long amount, MemoryUnit memoryUnit)
amount
- the amount of unitmemoryUnit
- the actual unit
public long getMaxBytesLocalOffHeap()
public String getMaxBytesLocalOffHeapAsString()
public void setMaxBytesLocalOffHeap(String maxBytesOffHeap)
maxBytesOffHeap
- String representation of the size, can be relative (in %)public Integer getMaxBytesLocalOffHeapPercentage()
public Integer getMaxBytesLocalHeapPercentage()
public String getMaxBytesLocalHeapAsString()
public Integer getMaxBytesLocalDiskPercentage()
public void setMaxBytesLocalOffHeap(Long maxBytesOffHeap)
maxBytesOffHeap
- max bytes on disk in bytespublic CacheConfiguration maxBytesLocalOffHeap(long amount, MemoryUnit memoryUnit)
amount
- the amount of unitmemoryUnit
- the actual unit
public long getMaxBytesLocalDisk()
public String getMaxBytesLocalDiskAsString()
public void setMaxBytesLocalDisk(String maxBytesDisk)
maxBytesDisk
- String representation of the size, can be relative (in %)public void setMaxBytesLocalDisk(Long maxBytesDisk)
maxBytesDisk
- max bytes on disk in bytespublic CacheConfiguration maxBytesLocalDisk(long amount, MemoryUnit memoryUnit)
amount
- the amount of unitmemoryUnit
- the actual unit
public void setDynamicAttributesExtractor(DynamicAttributesExtractor extractor)
extractor
- extractor to usepublic CacheConfiguration dynamicAttributeExtractor(DynamicAttributesExtractor extractor)
extractor
- extractor to use
public CopyStrategyConfiguration getCopyStrategyConfiguration()
public ElementValueComparatorConfiguration getElementValueComparatorConfiguration()
public boolean isMaxBytesLocalHeapPercentageSet()
setMaxBytesLocalHeap(String)
public boolean isMaxBytesLocalOffHeapPercentageSet()
setMaxBytesLocalOffHeap(String)
public boolean isMaxBytesLocalDiskPercentageSet()
setMaxBytesLocalDisk(String)
public void setupFor(CacheManager cacheManager)
cacheManager
- The CacheManager as part of which the cache is being setuppublic void setupFor(CacheManager cacheManager, boolean register, String parentCache)
cacheManager
- The CacheManager as part of which the cache is being setupregister
- true to register this cache configuration with the cache manager.public Collection<ConfigError> validate(Configuration configuration)
configuration
- the CacheManager configuration this is going to be used with
public boolean isCountBasedTuned()
public boolean isOverflowToOffHeapSet()
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 void addCacheDecoratorFactory(CacheConfiguration.CacheDecoratorFactoryConfiguration factory)
factory
- public final CacheConfiguration cacheLoaderFactory(CacheConfiguration.CacheLoaderFactoryConfiguration factory)
addCacheLoaderFactory(CacheLoaderFactoryConfiguration)
public final void addTerracotta(TerracottaConfiguration terracottaConfiguration)
public final void addPinning(PinningConfiguration pinningConfiguration)
public final CacheConfiguration pinning(PinningConfiguration pinningConfiguration)
addPinning(PinningConfiguration)
public final CacheConfiguration terracotta(TerracottaConfiguration terracottaConfiguration)
addTerracotta(TerracottaConfiguration)
public final CacheConfiguration searchable(Searchable searchable)
searchable
-
addSearchable(Searchable)
public final void addCacheWriter(CacheWriterConfiguration cacheWriterConfiguration)
public final CacheConfiguration cacheWriter(CacheWriterConfiguration cacheWriterConfiguration)
addCacheWriter(CacheWriterConfiguration)
public final void setTransactionalMode(String transactionalMode)
transactionalMode
- one of OFF, LOCAL, XA, XA_STRICTpublic final CacheConfiguration transactionalMode(String transactionalMode)
transactionalMode
- one of OFF, LOCAL, XA, XA_STRICT
setTransactionalMode(String)
public final CacheConfiguration transactionalMode(CacheConfiguration.TransactionalMode transactionalMode)
transactionalMode
- one of OFF, LOCAL, XA, XA_STRICT
setTransactionalMode(String)
@Deprecated public final void setStatistics(boolean enabled)
@Deprecated public final CacheConfiguration statistics(boolean statistics)
setStatistics(boolean)
public final boolean getStatistics()
public void validateCompleteConfiguration()
public void validateConfiguration()
public String getName()
@Deprecated public int getMaxElementsInMemory()
getMaxEntriesLocalHeap()
public long getCacheLoaderTimeoutMillis()
public int getMaxElementsOnDisk()
getMaxEntriesLocalDisk()
for unclustered caches and getMaxEntriesInCache()
for clustered caches.
public long getMaxEntriesInCache()
public long getMaxEntriesLocalDisk()
public long getMaxEntriesLocalHeap()
public MemoryStoreEvictionPolicy getMemoryStoreEvictionPolicy()
public boolean isClearOnFlush()
public boolean isEternal()
public long getTimeToIdleSeconds()
public long getTimeToLiveSeconds()
@Deprecated public boolean isOverflowToDisk()
overflowToDisk
attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP
.
@Deprecated public boolean isDiskPersistent()
diskPersistent
attribute has been replaced with persistence(PersistenceConfiguration)
.
public boolean isSearchable()
public int getDiskSpoolBufferSizeMB()
public long getDiskExpiryThreadIntervalSeconds()
public int getDiskAccessStripes()
public DynamicAttributesExtractor getDynamicExtractor()
public boolean getLogging()
public boolean isOverflowToOffHeap()
public SizeOfPolicyConfiguration getSizeOfPolicyConfiguration()
public PersistenceConfiguration getPersistenceConfiguration()
@Deprecated public String getMaxMemoryOffHeap()
getMaxBytesLocalOffHeapAsString()
@Deprecated public long getMaxMemoryOffHeapInBytes()
getMaxBytesLocalOffHeap()
public List getCacheEventListenerConfigurations()
public List getCacheExtensionConfigurations()
public List getCacheLoaderConfigurations()
public List<CacheConfiguration.CacheDecoratorFactoryConfiguration> getCacheDecoratorConfigurations()
public CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration getBootstrapCacheLoaderFactoryConfiguration()
public CacheConfiguration.CacheExceptionHandlerFactoryConfiguration getCacheExceptionHandlerFactoryConfiguration()
public TerracottaConfiguration getTerracottaConfiguration()
public PinningConfiguration getPinningConfiguration()
public CacheWriterConfiguration getCacheWriterConfiguration()
public boolean isTerracottaClustered()
clustered="true"
public TerracottaConfiguration.Consistency getTerracottaConsistency()
public final CacheConfiguration.TransactionalMode getTransactionalMode()
public boolean isXaStrictTransactional()
public boolean isLocalTransactional()
public boolean isXaTransactional()
public boolean addConfigurationListener(CacheConfigurationListener listener)
listener
- listener instance to add
public boolean addDynamicSearchListener(DynamicSearchListener listener)
listener
-
public boolean removeConfigurationListener(CacheConfigurationListener listener)
listener
- listener to remove
public void internalSetTimeToIdle(long timeToIdle)
public void internalSetTimeToLive(long timeToLive)
public void internalSetEternal(boolean eternal)
public void internalSetMemCapacity(int capacity)
public void internalSetMemCapacityInBytes(long capacity)
public void internalSetDiskCapacity(int capacity)
public void internalSetMaxEntriesInCache(int entries)
public void internalSetLogging(boolean logging)
public void internalSetMaxBytesLocalOffheap(long maxBytesLocalOffheap)
public void internalSetOverflowToOffheap(boolean overflowToOffHeap)
public Map<String,SearchAttribute> getSearchAttributes()
public Searchable getSearchable()
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |