Pivotal GemFire Native C++ Reference
10.0.5
|
An interface for objects who perform transaction management. More...
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 ()=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 | 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.
|
pure virtual |
Creates a new transaction and associates it with the current thread.
IllegalStateException | if the thread is already associated with a transaction |
|
pure virtual |
Commit the transaction associated with the current thread.
|
pure virtual |
Reports the existence of a Transaction for this thread.
|
pure virtual |
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 virtual |
Returns the transaction identifier for the current thread.
|
pure virtual |
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 |
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 virtual |
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 virtual |
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 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
transactionId | the transaction to resume |
|
pure virtual |
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 |
waitTime | the maximum time to wait |