public class TransactionProxyRollbackOnlyImpl<K,V> extends TransactionProxyImpl<K,V>
| Constructor and Description |
|---|
TransactionProxyRollbackOnlyImpl()
Empty constructor required for
Externalizable. |
TransactionProxyRollbackOnlyImpl(GridNearTxLocal tx,
GridCacheSharedContext<K,V> cctx,
boolean async) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Commits this transaction by initiating
two-phase-commit process. |
IgniteFuture<Void> |
commitAsync()
Asynchronously commits this transaction by initiating
two-phase-commit process. |
void |
resume()
Resume a transaction if it was previously suspended.
|
boolean |
setRollbackOnly()
Modify the transaction associated with the current thread such that the
only possible outcome of the transaction is to roll back the
transaction.
|
void |
suspend()
Suspends a transaction.
|
long |
timeout(long timeout)
Sets transaction timeout value.
|
close, concurrency, future, implicit, isAsync, isInvalidate, isolation, isRollbackOnly, label, nodeId, readExternal, rollback, rollbackAsync, startTime, state, threadId, timeout, toString, tx, withAsync, writeExternal, xidpublic TransactionProxyRollbackOnlyImpl()
Externalizable.public TransactionProxyRollbackOnlyImpl(GridNearTxLocal tx, GridCacheSharedContext<K,V> cctx, boolean async)
tx - Tx.cctx - Cctx.async - Async.public boolean setRollbackOnly()
setRollbackOnly in interface TransactionsetRollbackOnly in class TransactionProxyImpl<K,V>True if rollback-only flag was set as a result of this operation,
false if it was already set prior to this call or could not be set
because transaction is already finishing up committing or rolling back.public void commit()
two-phase-commit process.commit in interface Transactioncommit in class TransactionProxyImpl<K,V>public IgniteFuture<Void> commitAsync() throws IgniteException
two-phase-commit process.commitAsync in interface TransactioncommitAsync in class TransactionProxyImpl<K,V>IgniteException - If commit failed.TransactionTimeoutException - If transaction is timed out.TransactionRollbackException - If transaction is manually/automatically rolled back.TransactionOptimisticException - If transaction concurrency is TransactionConcurrency.OPTIMISTIC
and commit is optimistically failed.TransactionHeuristicException - If transaction has entered an unknown state.public void suspend()
throws IgniteException
suspend in interface Transactionsuspend in class TransactionProxyImpl<K,V>IgniteException - If suspension failed.public void resume()
throws IgniteException
resume in interface Transactionresume in class TransactionProxyImpl<K,V>IgniteException - If resume failed.public long timeout(long timeout)
timeout in interface Transactiontimeout in class TransactionProxyImpl<K,V>timeout - Transaction timeout value.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020