| Modifier and Type | Class and Description |
|---|---|
| private static class | JtaLocalTransactionStore.JtaLocalEhcacheSynchronization
A Synchronization used to terminate the local transaction and clean it up |
| private static class | JtaLocalTransactionStore.JtaLocalEhcacheXAResource
A XAResource implementation used to terminate the local transaction and clean it up. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final AtomicBoolean | |
| private static final VicariousThreadLocal | |
| private final Ehcache | |
| private static final Logger | |
| private final TransactionController | |
| private final TransactionManager | |
| private final TransactionManagerLookup |
| Access | Constructor and Description |
|---|---|
| public | JtaLocalTransactionStore(LocalTransactionStore
the underlying LocalTransactionStore underlyingStore, TransactionManagerLookup the TransactionManagerLookup transactionManagerLookup, TransactionController the TransactionController transactionController)Create a new JtaLocalTransactionStore instance |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsKey(Object
The Element key key)Implements net. |
| public Element | |
| public List | getKeys()
Implements net. |
| public Element | getOldElement(Object
the key to look for key)Overrides net. Element matching the key, oblivious of any in-flight transaction.
|
| public Element | getQuiet(Object key)
Implements net. Element from the Store, without updating statistics
|
| public int | |
| public int | getTerracottaClusteredSize()
Implements net. |
| public boolean | |
| public void | putAll(Collection<Element>
Collection of elements to be put in the store elements)Overrides net. Implements net. |
| public Element | putIfAbsent(Element
element to be added element)Implements net. |
| public boolean | putWithWriter(final Element element, final CacheWriterManager writerManager)
Implements net. |
| private void | |
| public Element | |
| public void | removeAll(Collection<?> keys)
Overrides net. Implements net. |
| 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. |
| private void |
| ALTERNATIVE_TERMINATION_MODE_SYS_PROPERTY_NAME | back to summary |
|---|---|
| private static final String ALTERNATIVE_TERMINATION_MODE_SYS_PROPERTY_NAME | |
| ATOMIKOS_WARNING_ISSUED | back to summary |
|---|---|
| private static final AtomicBoolean ATOMIKOS_WARNING_ISSUED | |
| BOUND_JTA_TRANSACTIONS | back to summary |
|---|---|
| private static final VicariousThreadLocal<Transaction> BOUND_JTA_TRANSACTIONS | |
| cache | back to summary |
|---|---|
| private final Ehcache cache | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| transactionController | back to summary |
|---|---|
| private final TransactionController transactionController | |
| transactionManager | back to summary |
|---|---|
| private final TransactionManager transactionManager | |
| transactionManagerLookup | back to summary |
|---|---|
| private final TransactionManagerLookup transactionManagerLookup | |
| JtaLocalTransactionStore | back to summary |
|---|---|
| public JtaLocalTransactionStore(LocalTransactionStore underlyingStore, TransactionManagerLookup transactionManagerLookup, TransactionController transactionController) Create a new JtaLocalTransactionStore instance
| |
| 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.
| |
| get | back to summary |
|---|---|
| public Element get(Object key) Implements net. Doc from net. Gets an item from the cache. | |
| getKeys | back to summary |
|---|---|
| public List Implements net. Doc from net. Gets an Array of the keys for all elements in the disk store.
| |
| getOldElement | back to summary |
|---|---|
| public Element getOldElement(Object key) Overrides net. Doc from net. Method to get to the | |
| 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.
| |
| putAll | back to summary |
|---|---|
| public void putAll(Collection<Element> elements) throws CacheException Overrides net. Implements net. Doc from net. Puts a collection of elements 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
| |
| registerInJtaContext | back to summary |
|---|---|
| private void registerInJtaContext() | |
| 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(Collection<?> keys) Overrides net. Implements net. Doc from net. Removes a collection of elements 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
| |
| setRollbackOnly | back to summary |
|---|---|
| private void setRollbackOnly() | |
| Modifier and Type | Field and Description |
|---|---|
| private final TransactionController | |
| private final TransactionID |
| Access | Constructor and Description |
|---|---|
| private | JtaLocalEhcacheSynchronization(TransactionController transactionController, TransactionID transactionId)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | afterCompletion(int
The status of the transaction completion. status)Implements javax. |
| public void | beforeCompletion()
Implements javax. |
| public String |
| transactionController | back to summary |
|---|---|
| private final TransactionController transactionController | |
| transactionId | back to summary |
|---|---|
| private final TransactionID transactionId | |
| JtaLocalEhcacheSynchronization | back to summary |
|---|---|
| private JtaLocalEhcacheSynchronization(TransactionController transactionController, TransactionID transactionId) | |
| afterCompletion | back to summary |
|---|---|
| public void afterCompletion(int status) Implements javax. Doc from javax. This method is called by the transaction manager after the transaction is committed or rolled back.
| |
| beforeCompletion | back to summary |
|---|---|
| public void beforeCompletion() Implements javax. Doc from javax. The beforeCompletion method is called by the transaction manager prior to the start of the two-phase transaction commit process. This call is executed with the transaction context of the transaction that is being committed. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private final TransactionController | |
| private final TransactionID | |
| private final TransactionManagerLookup |
| Access | Constructor and Description |
|---|---|
| private | JtaLocalEhcacheXAResource(TransactionController transactionController, TransactionID transactionId, TransactionManagerLookup transactionManagerLookup)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addTwoPcExecutionListener(XAExecutionListener
the XAExecutionListener listener)Implements net. |
| public void | commit(Xid
A global transaction identifier xid, boolean If true, the resource manager should use a one-phase
commit protocol to commit the work done on behalf of xid. onePhase)Implements javax. |
| public XATransactionContext | createTransactionContext()
Implements net. XATransactionContext with the current Transaction,
or create a new one should none be there yet.
|
| public void | end(Xid
A global transaction identifier that is the same as
the identifier used previously in the xid, int start method.One of TMSUCCESS, TMFAIL, or TMSUSPEND. flag)Implements javax. |
| public void | forget(Xid
A global transaction identifier. xid)Implements javax. |
| public String | getCacheName()
Implements net. |
| public XATransactionContext | getCurrentTransactionContext()
Implements net. XATransactionContext associated with this resource
|
| public int | getTransactionTimeout()
Implements javax. |
| public boolean | isSameRM(XAResource
An XAResource object whose resource manager instance
is to be compared with the resource manager instance of the
target object. xaResource)Implements javax. |
| public int | prepare(Xid
A global transaction identifier. xid)Implements javax. |
| public Xid[] | recover(int
One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
must be used when no other flags are set in the parameter. flags)Implements javax. |
| public void | rollback(Xid
A global transaction identifier. xid)Implements javax. |
| public boolean | setTransactionTimeout(int
The transaction timeout value in seconds. timeout)Implements javax. XAResource
instance.
|
| public void | start(Xid
A global transaction identifier to be associated
with the resource. xid, int One of TMNOFLAGS, TMJOIN, or TMRESUME. flag)Implements javax. xid.
|
| public String |
| transactionController | back to summary |
|---|---|
| private final TransactionController transactionController | |
| transactionId | back to summary |
|---|---|
| private final TransactionID transactionId | |
| transactionManagerLookup | back to summary |
|---|---|
| private final TransactionManagerLookup transactionManagerLookup | |
| JtaLocalEhcacheXAResource | back to summary |
|---|---|
| private JtaLocalEhcacheXAResource(TransactionController transactionController, TransactionID transactionId, TransactionManagerLookup transactionManagerLookup) | |
| addTwoPcExecutionListener | back to summary |
|---|---|
| public void addTwoPcExecutionListener(XAExecutionListener listener) Implements net. Doc from net. Add a listener which will be called back according to the 2PC lifecycle
| |
| commit | back to summary |
|---|---|
| public void commit(Xid xid, boolean onePhase) throws XAException Implements javax. Doc from javax. Commits the global transaction specified by xid.
| |
| createTransactionContext | back to summary |
|---|---|
| public XATransactionContext createTransactionContext() throws SystemException, RollbackException Implements net. Doc from net. Obtain the already associated
| |
| end | back to summary |
|---|---|
| public void end(Xid xid, int flag) throws XAException Implements javax. Doc from javax. Ends the work performed on behalf of a transaction branch. The resource manager disassociates the XA resource from the transaction branch specified and lets the transaction complete. If TMSUSPEND is specified in the flags, the transaction branch
is temporarily suspended in an incomplete state. The transaction
context is in a suspended state and must be resumed via the
If TMFAIL is specified, the portion of work has failed. The resource manager may mark the transaction as rollback-only If TMSUCCESS is specified, the portion of work has completed successfully.
| |
| forget | back to summary |
|---|---|
| public void forget(Xid xid) throws XAException Implements javax. Doc from javax. Tells the resource manager to forget about a heuristically completed transaction branch.
| |
| getCacheName | back to summary |
|---|---|
| public String getCacheName() Implements net. Doc from net. Getter to the name of the cache wrapped by this XAResource
| |
| getCurrentTransactionContext | back to summary |
|---|---|
| public XATransactionContext getCurrentTransactionContext() Implements net. Doc from net. Gets the current
| |
| getTransactionTimeout | back to summary |
|---|---|
| public int getTransactionTimeout() throws XAException Implements javax. Doc from javax. Obtains the current transaction timeout value set for this
XAResource instance. If
| |
| isSameRM | back to summary |
|---|---|
| public boolean isSameRM(XAResource xaResource) throws XAException Implements javax. Doc from javax. This method is called to determine if the resource manager instance represented by the target object is the same as the resource manager instance represented by the parameter xares.
| |
| prepare | back to summary |
|---|---|
| public int prepare(Xid xid) throws XAException Implements javax. Doc from javax. Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
| |
| recover | back to summary |
|---|---|
| public Xid[] recover(int flags) throws XAException Implements javax. Doc from javax. Obtains a list of prepared transaction branches from a resource manager. The transaction manager calls this method during recovery to obtain the list of transaction branches that are currently in prepared or heuristically completed states.
| |
| rollback | back to summary |
|---|---|
| public void rollback(Xid xid) throws XAException Implements javax. Doc from javax. Informs the resource manager to roll back work done on behalf of a transaction branch.
| |
| setTransactionTimeout | back to summary |
|---|---|
| public boolean setTransactionTimeout(int timeout) throws XAException Implements javax. Doc from javax. Sets the current transaction timeout value for this
| |
| start | back to summary |
|---|---|
| public void start(Xid xid, int flag) throws XAException Implements javax. Doc from javax. Starts work on behalf of a transaction branch specified in
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |