| Modifier and Type | Field and Description |
|---|---|
| private final Ehcache | |
| private final String | |
| private final ElementValueComparator | |
| private static final Logger | |
| private final SoftLockManager | |
| private final TransactionController | |
| private final TransactionIDFactory |
| Access | Constructor and Description |
|---|---|
| public | LocalTransactionStore(TransactionController
the TransactionController transactionController, TransactionIDFactory transactionIdFactory, SoftLockManager the SoftLockManager softLockManager, Ehcache the cache cache, Store the underlying store store, ElementValueComparator the element value comparator comparator)Create a new LocalTransactionStore instance |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private boolean | |
| pack-priv void | commit(List<SoftLock>
the soft locks to commit softLocks, TransactionID the transaction ID to commit transactionId)Commit work of the specified soft locks |
| public boolean | containsKey(Object
The Element key key)Implements net. |
| private Element | |
| public void | dispose()
Overrides net. Implements net. |
| public Element | |
| pack-priv Ehcache | |
| private LocalTransactionContext | |
| public List | getKeys()
Implements net. |
| public Element | getQuiet(Object key)
Implements net. Element from the Store, without updating statistics
|
| public int | |
| public int | getTerracottaClusteredSize()
Implements net. |
| public boolean | |
| public Element | putIfAbsent(Element
element to be added element)Implements net. |
| public boolean | putWithWriter(final Element element, final CacheWriterManager writerManager)
Implements net. |
| public Set | Returns: a set of transaction IDs that were recoveredRecover and resolve all known soft locks |
| public Element | |
| public void | removeAll()
Implements net. |
| public Element | removeElement(Element
Element to be removed element, ElementValueComparator ElementValueComparator to use to compare elements comparator)Implements net. |
| public Element | removeWithWriter(final Object key, final CacheWriterManager writerManager)
Implements net. |
| public boolean | replace(Element
Element to be test against old, Element Element to be cached element, ElementValueComparator ElementValueComparator to use to compare elements comparator)Implements net. |
| public Element | replace(Element
Element to be cached element)Implements net. |
| pack-priv void | rollback(List<SoftLock>
the soft locks to rollback softLocks, TransactionID the transaction ID to rollback transactionId)Rollback work of the specified soft locks |
| private long |
| cache | back to summary |
|---|---|
| private final Ehcache cache | |
| cacheName | back to summary |
|---|---|
| private final String cacheName | |
| comparator | back to summary |
|---|---|
| private final ElementValueComparator comparator | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| softLockManager | back to summary |
|---|---|
| private final SoftLockManager softLockManager | |
| transactionController | back to summary |
|---|---|
| private final TransactionController transactionController | |
| transactionIdFactory | back to summary |
|---|---|
| private final TransactionIDFactory transactionIdFactory | |
| LocalTransactionStore | back to summary |
|---|---|
| public LocalTransactionStore(TransactionController transactionController, TransactionIDFactory transactionIdFactory, SoftLockManager softLockManager, Ehcache cache, Store store, ElementValueComparator comparator) Create a new LocalTransactionStore instance
| |
| assertNotTimedOut | back to summary |
|---|---|
| private void assertNotTimedOut() | |
| cleanupExpiredSoftLock | back to summary |
|---|---|
| private boolean cleanupExpiredSoftLock(Element oldElement, SoftLockID softLockId) | |
| commit | back to summary |
|---|---|
| pack-priv void commit(List<SoftLock> softLocks, TransactionID transactionId) Commit work of the specified soft locks
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Implements net. Doc from net. A check to see if a key is in the Store.
| |
| createElement | back to summary |
|---|---|
| private Element createElement(Object key, SoftLockID softLockId) | |
| dispose | back to summary |
|---|---|
| public void dispose() Overrides net. Implements net. Doc from net. Prepares for shutdown.
| |
| get | back to summary |
|---|---|
| public Element get(Object key) Implements net. Doc from net. Gets an item from the cache. | |
| getCache | back to summary |
|---|---|
| pack-priv Ehcache getCache() Get the cache using this store
| |
| getCurrentTransactionContext | back to summary |
|---|---|
| private LocalTransactionContext getCurrentTransactionContext() | |
| getKeys | back to summary |
|---|---|
| public List Implements net. Doc from net. Gets an Array of the keys for all elements in the disk store.
| |
| getQuiet | back to summary |
|---|---|
| public Element getQuiet(Object key) Implements net. Doc from net. Gets an
| |
| getSize | back to summary |
|---|---|
| public int getSize() Implements net. Doc from net. Returns the current local store size
| |
| getTerracottaClusteredSize | back to summary |
|---|---|
| public int getTerracottaClusteredSize() Implements net. Doc from net. Returns the current Terracotta clustered store size
| |
| put | back to summary |
|---|---|
| public boolean put(Element element) throws CacheException Implements net. Doc from net. Puts an item into the store.
| |
| putIfAbsent | back to summary |
|---|---|
| public Element putIfAbsent(Element element) throws NullPointerException Implements net. Doc from net. Put an element in the store if no element is currently mapped to the elements key.
| |
| putWithWriter | back to summary |
|---|---|
| public boolean putWithWriter(final Element element, final CacheWriterManager writerManager) throws CacheException Implements net. Doc from net. Puts an item into the store and the cache writer manager in an atomic operation
| |
| recover | back to summary |
|---|---|
| public Set Recover and resolve all known soft locks
| |
| remove | back to summary |
|---|---|
| public Element remove(Object key) Implements net. Doc from net. Removes an item from the cache. | |
| removeAll | back to summary |
|---|---|
| public void removeAll() throws CacheException Implements net. Doc from net. Remove all of the elements from the store.
If there are registered | |
| removeElement | back to summary |
|---|---|
| public Element removeElement(Element element, ElementValueComparator comparator) throws NullPointerException Implements net. Doc from net. 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. This is a CAS operation. It is consistent even against a distributed cache that is not coherent. If the old value is stale when this operation is attempted the remove does not take place.
| |
| removeWithWriter | back to summary |
|---|---|
| public Element removeWithWriter(final Object key, final CacheWriterManager writerManager) throws CacheException Implements net. Doc from net. Removes an item from the store and the cache writer manager in an atomic operation. | |
| replace | back to summary |
|---|---|
| public boolean replace(Element old, Element element, ElementValueComparator comparator) throws NullPointerException, IllegalArgumentException Implements net. Doc from net. Replace the cached element only if the value of the current Element is equal to the value of the supplied old Element.
| |
| replace | back to summary |
|---|---|
| public Element replace(Element element) throws NullPointerException Implements net. Doc from net. Replace the cached element only if an Element is currently cached for this key
| |
| rollback | back to summary |
|---|---|
| pack-priv void rollback(List<SoftLock> softLocks, TransactionID transactionId) Rollback work of the specified soft locks
| |
| timeBeforeTimeout | back to summary |
|---|---|
| private long timeBeforeTimeout() | |