public class EhCache<V> extends CacheAdapterBase<V>
cache.default.
.log
Constructor and Description |
---|
EhCache() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(String ownerName) |
int |
getDiskExpiryThreadIntervalSeconds() |
protected V |
getElement(String key) |
int |
getMaxElementsInMemory() |
int |
getMaxElementsOnDisk() |
String |
getMemoryStoreEvictionPolicy() |
int |
getTimeToIdleSeconds() |
int |
getTimeToLiveSeconds() |
boolean |
isDiskPersistent() |
boolean |
isEternal() |
boolean |
isOverflowToDisk() |
void |
open() |
protected void |
putElement(String key,
V value) |
protected boolean |
removeElement(Object key) |
void |
setDiskExpiryThreadIntervalSeconds(int diskExpiryThreadIntervalSeconds)
How often to run the disk store expiry thread
|
void |
setDiskPersistent(boolean diskPersistent)
If
true , the the cache is reloaded after the JVM restarts |
void |
setEternal(boolean eternal)
If
true , the elements in the cache are eternal, i.e. |
void |
setMaxElementsInMemory(int maxElementsInMemory)
The maximum number of elements in memory, before they are evicted
|
void |
setMaxElementsOnDisk(int maxElementsOnDisk)
The maximum number of elements on disk, before they are removed
|
void |
setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
Either
LRU =Least Recent Use,LFU =Least Frequent Use or FIFO =First In - First Out |
void |
setOverflowToDisk(boolean overflowToDisk)
If
true , the elements that are evicted from memory are spooled to disk |
void |
setTimeToIdleSeconds(int timeToIdleSeconds)
The amount of time in seconds to live for an element from its last accessed or modified date
|
void |
setTimeToLiveSeconds(int timeToLiveSeconds)
The amount of time in seconds to live for an element from its creation date
|
protected V |
toValue(Message value) |
get, getLogPrefix, put, remove, setCacheEmptyKeys, setCacheEmptyValues, setKeyInputSessionKey, setKeyNamespaceDefs, setKeyStyleSheet, setKeyXPath, setKeyXPathOutputType, setName, setValueInputSessionKey, setValueNamespaceDefs, setValueStyleSheet, setValueXPath, setValueXPathOutputType, transformKey, transformValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getApplicationContext, getName
getConfigurationClassLoader
public void configure(String ownerName) throws ConfigurationException
configure
in interface ICache<String,V>
configure
in class CacheAdapterBase<V>
ConfigurationException
public void open()
public void close()
protected V getElement(String key)
getElement
in class CacheAdapterBase<V>
protected void putElement(String key, V value)
putElement
in class CacheAdapterBase<V>
protected boolean removeElement(Object key)
removeElement
in class CacheAdapterBase<V>
protected V toValue(Message value)
toValue
in class CacheAdapterBase<V>
public void setMaxElementsInMemory(int maxElementsInMemory)
public int getMaxElementsInMemory()
public void setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
LRU
=Least Recent Use,LFU
=Least Frequent Use or FIFO
=First In - First Outpublic String getMemoryStoreEvictionPolicy()
public void setEternal(boolean eternal)
true
, the elements in the cache are eternal, i.e. never expirepublic boolean isEternal()
public void setTimeToLiveSeconds(int timeToLiveSeconds)
public int getTimeToLiveSeconds()
public void setTimeToIdleSeconds(int timeToIdleSeconds)
public int getTimeToIdleSeconds()
public void setOverflowToDisk(boolean overflowToDisk)
true
, the elements that are evicted from memory are spooled to diskpublic boolean isOverflowToDisk()
public void setMaxElementsOnDisk(int maxElementsOnDisk)
public int getMaxElementsOnDisk()
public void setDiskPersistent(boolean diskPersistent)
true
, the the cache is reloaded after the JVM restartspublic boolean isDiskPersistent()
public void setDiskExpiryThreadIntervalSeconds(int diskExpiryThreadIntervalSeconds)
public int getDiskExpiryThreadIntervalSeconds()
Copyright © 2023 Frank!Framework. All rights reserved.