| Modifier and Type | Field and Description |
|---|---|
| private final Ehcache | |
| private final OperationObserver | |
| private final ElementValueComparator | |
| private volatile Xid | |
| private final List | |
| private static final Logger | |
| private static final long | |
| private final XARequestProcessor | |
| private final OperationObserver | |
| private final OperationObserver | |
| private final SoftLockManager | |
| private final TransactionIDFactory | |
| private volatile int | |
| private final TransactionManager | |
| private final Store | |
| private final ConcurrentMap |
| Access | Constructor and Description |
|---|---|
| public | EhcacheXAResourceImpl(Ehcache
the cache cache, Store the underlying store underlyingStore, TransactionManagerLookup the transaction manager lookup txnManagerLookup, SoftLockManager the soft lock manager softLockManager, TransactionIDFactory the transaction ID factory transactionIDFactory, ElementValueComparator the element value comparator comparator, OperationObserver<XaCommitOutcome> commitObserver, OperationObserver<XaRollbackOutcome> rollbackObserver, OperationObserver<XaRecoveryOutcome> recoveryObserver)Constructor |
| 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 void | commitInternal(Xid
a XID xid, boolean true if onePhase, false otherwise onePhase)The commit implementation |
| 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. |
| private void | |
| private void | |
| public void | forget(Xid
A global transaction identifier. xid)Implements javax. |
| public void | |
| 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 int | |
| private static String | |
| 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 void | |
| 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 |
| cache | back to summary |
|---|---|
| private final Ehcache cache | |
| commitObserver | back to summary |
|---|---|
| private final OperationObserver<XaCommitOutcome> commitObserver | |
| comparator | back to summary |
|---|---|
| private final ElementValueComparator comparator | |
| currentXid | back to summary |
|---|---|
| private volatile Xid currentXid | |
| listeners | back to summary |
|---|---|
| private final List<XAExecutionListener> listeners | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| MILLISECOND_PER_SECOND | back to summary |
|---|---|
| private static final long MILLISECOND_PER_SECOND | |
| processor | back to summary |
|---|---|
| private final XARequestProcessor processor | |
| recoveryObserver | back to summary |
|---|---|
| private final OperationObserver<XaRecoveryOutcome> recoveryObserver | |
| rollbackObserver | back to summary |
|---|---|
| private final OperationObserver<XaRollbackOutcome> rollbackObserver | |
| softLockManager | back to summary |
|---|---|
| private final SoftLockManager softLockManager | |
| transactionIDFactory | back to summary |
|---|---|
| private final TransactionIDFactory transactionIDFactory | |
| transactionTimeout | back to summary |
|---|---|
| private volatile int transactionTimeout | |
| txnManager | back to summary |
|---|---|
| private final TransactionManager txnManager | |
| underlyingStore | back to summary |
|---|---|
| private final Store underlyingStore | |
| xidToContextMap | back to summary |
|---|---|
| private final ConcurrentMap<Xid, XATransactionContext> xidToContextMap | |
| EhcacheXAResourceImpl | back to summary |
|---|---|
| public EhcacheXAResourceImpl(Ehcache cache, Store underlyingStore, TransactionManagerLookup txnManagerLookup, SoftLockManager softLockManager, TransactionIDFactory transactionIDFactory, ElementValueComparator comparator, OperationObserver<XaCommitOutcome> commitObserver, OperationObserver<XaRollbackOutcome> rollbackObserver, OperationObserver<XaRecoveryOutcome> recoveryObserver) Constructor
| |
| 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.
| |
| commitInternal | back to summary |
|---|---|
| public void commitInternal(Xid xid, boolean onePhase) throws XAException The commit implementation
| |
| 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.
| |
| fireAfterCommitOrRollback | back to summary |
|---|---|
| private void fireAfterCommitOrRollback() | |
| fireBeforePrepare | back to summary |
|---|---|
| private void fireBeforePrepare() | |
| 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.
| |
| forgetInternal | back to summary |
|---|---|
| public void forgetInternal(Xid xid) throws XAException The forget implementation
| |
| 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.
| |
| prepareInternal | back to summary |
|---|---|
| public int prepareInternal(Xid xid) throws XAException The prepare implementation
| |
| prettyPrintXAResourceFlags | back to summary |
|---|---|
| private static String prettyPrintXAResourceFlags(int flags) | |
| 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.
| |
| rollbackInternal | back to summary |
|---|---|
| public void rollbackInternal(Xid xid) throws XAException The rollback implementation
| |
| 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. | |