|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.constructs.nonstop.store.ExecutorServiceStore
net.sf.ehcache.constructs.nonstop.store.TransactionalExecutorServiceStore
public class TransactionalExecutorServiceStore
This implementation is identical to TransactionalExecutorServiceStore except that it ensures the transactional context gets propagated to the executor thread.
ExecutorServiceStore
Field Summary |
---|
Fields inherited from class net.sf.ehcache.constructs.nonstop.store.ExecutorServiceStore |
---|
nonstopConfiguration |
Fields inherited from interface net.sf.ehcache.store.Store |
---|
CLUSTER_COHERENT, NODE_COHERENT |
Constructor Summary | |
---|---|
TransactionalExecutorServiceStore(NonstopActiveDelegateHolder nonstopActiveDelegateHolder,
NonstopConfiguration nonstopConfiguration,
NonstopTimeoutBehaviorStoreResolver timeoutBehaviorResolver,
CacheCluster cacheCluster,
TransactionManagerLookup transactionManagerLookup,
ExplicitLockingContextThreadLocal explicitLockingContextThreadLocal)
Constructor |
Method Summary | |
---|---|
boolean |
containsKey(Object key)
A check to see if a key is in the Store. |
Element |
get(Object key)
Gets an item from the cache. |
List |
getKeys()
Gets an Array of the keys for all elements in the disk store. |
Element |
getQuiet(Object key)
Gets an Element from the Store, without updating statistics |
int |
getSize()
Returns the current local store size |
int |
getTerracottaClusteredSize()
Returns the current Terracotta clustered store size |
boolean |
put(Element element)
Puts an item into the store. |
Element |
putIfAbsent(Element element)
Put an element in the store if no element is currently mapped to the elements key. |
boolean |
putWithWriter(Element element,
CacheWriterManager writerManager)
Puts an item into the store and the cache writer manager in an atomic operation |
Element |
remove(Object key)
Removes an item from the cache. |
void |
removeAll()
Remove all of the elements from the store. |
Element |
removeElement(Element element,
ElementValueComparator comparator)
Remove the Element mapped to the key for the supplied element if the value of the supplied Element is equal to the value of the cached Element. |
Element |
removeWithWriter(Object key,
CacheWriterManager writerManager)
Removes an item from the store and the cache writer manager in an atomic operation. |
Element |
replace(Element element)
Replace the cached element only if an Element is currently cached for this key |
boolean |
replace(Element old,
Element element,
ElementValueComparator comparator)
Replace the cached element only if the value of the current Element is equal to the value of the supplied old Element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionalExecutorServiceStore(NonstopActiveDelegateHolder nonstopActiveDelegateHolder, NonstopConfiguration nonstopConfiguration, NonstopTimeoutBehaviorStoreResolver timeoutBehaviorResolver, CacheCluster cacheCluster, TransactionManagerLookup transactionManagerLookup, ExplicitLockingContextThreadLocal explicitLockingContextThreadLocal)
explicitLockingContextThreadLocal
- Method Detail |
---|
public boolean put(Element element) throws CacheException
put
in interface Store
put
in class ExecutorServiceStore
CacheException
public boolean putWithWriter(Element element, CacheWriterManager writerManager) throws CacheException
putWithWriter
in interface Store
putWithWriter
in class ExecutorServiceStore
CacheException
public Element get(Object key)
get
in interface Store
get
in class ExecutorServiceStore
public Element getQuiet(Object key)
Element
from the Store, without updating statistics..
getQuiet
in interface Store
getQuiet
in class ExecutorServiceStore
public List getKeys()
getKeys
in interface Store
getKeys
in class ExecutorServiceStore
Serializable
keyspublic Element remove(Object key)
remove
in interface Store
remove
in class ExecutorServiceStore
public Element removeWithWriter(Object key, CacheWriterManager writerManager) throws CacheException
removeWithWriter
in interface Store
removeWithWriter
in class ExecutorServiceStore
CacheException
public void removeAll() throws CacheException
CacheEventListener
s they are notified of the expiry or removal
of the Element
as each is removed..
The timeout used by this method is NonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()
times the timeout value in the
config..
The timeout used by this method is NonstopConfiguration.getBulkOpsTimeoutMultiplyFactor()
times the timeout value in the
config.
removeAll
in interface Store
removeAll
in class ExecutorServiceStore
CacheException
public Element putIfAbsent(Element element) throws NullPointerException
putIfAbsent
in interface Store
putIfAbsent
in class ExecutorServiceStore
element
- element to be added
NullPointerException
- if the element is null, or has a null keypublic Element removeElement(Element element, ElementValueComparator comparator) throws NullPointerException
removeElement
in interface Store
removeElement
in class ExecutorServiceStore
element
- Element to be removedcomparator
- ElementValueComparator to use to compare elements
NullPointerException
- if the element is null, or has a null keypublic boolean replace(Element old, Element element, ElementValueComparator comparator) throws NullPointerException, IllegalArgumentException
replace
in interface Store
replace
in class ExecutorServiceStore
old
- Element to be test againstelement
- Element to be cachedcomparator
- ElementValueComparator to use to compare elements
NullPointerException
- if the either Element is null or has a null key
IllegalArgumentException
- if the two Element keys are non-null but not equalpublic Element replace(Element element) throws NullPointerException
replace
in interface Store
replace
in class ExecutorServiceStore
element
- Element to be cached
NullPointerException
- if the Element is null or has a null keypublic int getSize()
getSize
in interface Store
getSize
in class ExecutorServiceStore
public int getTerracottaClusteredSize()
getTerracottaClusteredSize
in interface Store
getTerracottaClusteredSize
in class ExecutorServiceStore
public boolean containsKey(Object key)
containsKey
in interface Store
containsKey
in class ExecutorServiceStore
key
- The Element key
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |