|
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 ()=0 |
| Reports the existence of a Transaction for this thread. More...
|
|
virtual bool | exists (TransactionId &transactionId)=0 |
| Reports the existence of a transaction for the given transactionId. More...
|
|
virtual TransactionId & | getTransactionId ()=0 |
| Returns the transaction identifier for the current thread. More...
|
|
virtual bool | isSuspended (TransactionId &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, for the transaction associated with the current thread. More...
|
|
virtual void | resume (TransactionId &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 TransactionId & | suspend ()=0 |
| Suspends the transaction on the current thread. More...
|
|
virtual bool | tryResume (TransactionId &transactionId)=0 |
| On the current thread, resumes a transaction that was previously suspended using suspend(). More...
|
|
virtual bool | tryResume (TransactionId &transactionId, std::chrono::milliseconds waitTime)=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...
|
|
An interface for objects who perform transaction management.
virtual void apache::geode::client::CacheTransactionManager::prepare |
( |
| ) |
|
|
pure virtual |
Performs prepare during 2 phase commit completion, for the transaction associated with the current thread.
Locks of the entries modified in the current transaction on the server side. If the prepare operation fails due to a conflict it will destroy the transaction state and throw a CommitConflictException. If the prepare operation succeeds, transaction state is set to prepared state. When this method completes, the thread is still associated with a transaction, and is waiting on commit or rollback operation.
- Exceptions
-
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. |
virtual bool apache::geode::client::CacheTransactionManager::tryResume |
( |
TransactionId & |
transactionId | ) |
|
|
pure virtual |
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
- Parameters
-
transactionId | the transaction to resume |
- Returns
- true if the transaction was resumed, false otherwise
- Since
- 3.6.2