VMware GemFire Native C++ Reference
9.1
|
Extension of the apache::geode::client::CacheTransactionManager that enables client application to use Geode transaction as part of the global XA transaction. More...
Inherits apache::geode::client::CacheTransactionManager.
Public Member Functions | |
virtual void | begin ()=0 |
Creates a new transaction and associates it with the current thread. More... | |
virtual void | commit ()=0 |
Commit the transaction associated with the current thread. More... | |
virtual bool | exists (TransactionIdPtr transactionId)=0 |
Reports the existence of a transaction for the given transactionId. More... | |
virtual bool | exists ()=0 |
Reports the existence of a Transaction for this thread. More... | |
virtual TransactionIdPtr | getTransactionId ()=0 |
Returns the transaction identifier for the current thread. More... | |
virtual bool | isSuspended (TransactionIdPtr transactionId)=0 |
This method can be used to determine if a transaction with the given transaction identifier is currently suspended locally. More... | |
virtual void | prepare ()=0 |
Performs prepare during 2 phase commit completion. More... | |
void | preserveSB () const |
Atomically increment reference count. More... | |
int32_t | refCount () |
void | releaseSB () const |
Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. More... | |
virtual void | resume (TransactionIdPtr transactionId)=0 |
On the current thread, resumes a transaction that was previously suspended using suspend(). More... | |
virtual void | rollback ()=0 |
Roll back the transaction associated with the current thread. More... | |
virtual TransactionIdPtr | suspend ()=0 |
Suspends the transaction on the current thread. More... | |
virtual bool | tryResume (TransactionIdPtr transactionId)=0 |
On the current thread, resumes a transaction that was previously suspended using suspend(). More... | |
virtual bool | tryResume (TransactionIdPtr transactionId, int32_t waitTimeInMilliSec)=0 |
On the current thread, resumes a transaction that was previously suspended using suspend(), or waits for the specified timeout interval if the transaction has not been suspended. More... | |
Extension of the apache::geode::client::CacheTransactionManager that enables client application to use Geode transaction as part of the global XA transaction.
The prepare method of this class corresponds to the prepare phases of the 2 phase commit protocol driven by a global transaction manager.
The implementation of the apache::geode::client::CacheTransactionManager commit() and rollback() methods must be 2 phase commit process aware.
Methods of this class are expected to be called by a custom XA Resource Manager that is wrapping and adapting Geode client to XA specification requirements.
|
pure virtualinherited |
Creates a new transaction and associates it with the current thread.
IllegalStateException | if the thread is already associated with a transaction |
|
pure virtualinherited |
Commit the transaction associated with the current thread.
If the commit operation fails due to a conflict it will destroy the transaction state and throw a CommitConflictException. If the commit operation succeeds, it returns after the transaction state has been merged with committed state. When this method completes, the thread is no longer associated with a transaction.
IllegalStateException | if the thread is not associated with a transaction |
CommitConflictException | if the commit operation fails due to a write conflict. |
TransactionDataNodeHasDepartedException | if the node hosting the transaction data has departed. This is only relevant for transaction that involve PartitionedRegions. |
TransactionDataNotColocatedException | if at commit time, the data involved in the transaction has moved away from the transaction hosting node. This can only happen if rebalancing/recovery happens during a transaction that involves a PartitionedRegion. |
TransactionInDoubtException | when Geode cannot tell which nodes have applied the transaction and which have not. This only occurs if nodes fail mid-commit, and only then in very rare circumstances. |
|
pure virtualinherited |
Reports the existence of a transaction for the given transactionId.
This method can be used to determine if a transaction with the given transaction identifier is currently in progress locally.
transactionId | the given transaction identifier |
|
pure virtualinherited |
Reports the existence of a Transaction for this thread.
|
pure virtualinherited |
Returns the transaction identifier for the current thread.
|
pure virtualinherited |
This method can be used to determine if a transaction with the given transaction identifier is currently suspended locally.
This method does not check other members for transaction status.
transactionId |
|
pure virtual |
Performs prepare during 2 phase commit completion.
Locks of the entries modified in the current transaction on the server side.
Calls to subsequent commit() or rollback() methods overridden by this class are expected to succeed after prepare() has returned successfully. Geode commits internal transaction irreversibly on commit() call.
|
inherited |
Atomically increment reference count.
|
inlineinherited |
|
inherited |
Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
|
pure virtualinherited |
On the current thread, resumes a transaction that was previously suspended using suspend().
transactionId | the transaction to resume |
IllegalStateException | if the thread is associated with a transaction or if isSuspended(TransactionId) would return false for the given transactionId |
|
pure virtualinherited |
Roll back the transaction associated with the current thread.
When this method completes, the thread is no longer associated with a transaction and the transaction context is destroyed.
IllegalStateException | if the thread is not associated with a transaction |
|
pure virtualinherited |
Suspends the transaction on the current thread.
All subsequent operations performed by this thread will be non-transactional. The suspended transaction can be resumed by calling resume(TransactionId)
|
pure virtualinherited |
On the current thread, resumes a transaction that was previously suspended using suspend().
This method is equivalent to
if (isSuspended(txId)) { resume(txId); }
except that this action is performed atomically
transactionId | the transaction to resume |
|
pure virtualinherited |
On the current thread, resumes a transaction that was previously suspended using suspend(), or waits for the specified timeout interval if the transaction has not been suspended.
This method will return if:
This method returns immediately if exists(TransactionId) returns false.
transactionId | the transaction to resume |
waitTimeInMilliSec | the maximum milliseconds to wait |