public class TransactionalBase extends Object implements TransactionalSystem
Transactional via TransactionalSystem.
This base class provides the "per thread" aspect - the TransactionCoordinator itself
is not thread aware.Transactional.Promote| Constructor and Description |
|---|
TransactionalBase(String label,
TransactionCoordinator txnMgr) |
TransactionalBase(TransactionCoordinator txnMgr) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
void |
attach(TransactionCoordinatorState coordinatorState)
Attach a transaction to this thread.
|
void |
begin(ReadWrite readWrite) |
void |
begin(TxnType txnType) |
void |
commit() |
void |
commitExec()
Do the 2-phase "commit" step
|
void |
commitPrepare()
Do the 2-phase "prepare" step after which
the transaction coordinator decides whether to commit
or abort.
|
TransactionCoordinatorState |
detach()
Suspend this transaction, detaching from the current thread.
|
void |
end() |
Transaction |
getThreadTransaction()
Return the transaction object for this thread.
|
TransactionInfo |
getTransactionInfo()
Return an information view of the transaction for this thread, if any.
|
TransactionCoordinator |
getTxnMgr()
Get the associated
TransactionCoordinator |
boolean |
isInTransaction() |
boolean |
promote() |
boolean |
promote(Transactional.Promote promoteMode) |
void |
shutdown()
Shutdown component, aborting any in-progress transactions.
|
ReadWrite |
transactionMode() |
TxnType |
transactionType() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeginpublic TransactionalBase(String label, TransactionCoordinator txnMgr)
public TransactionalBase(TransactionCoordinator txnMgr)
public TransactionCoordinator getTxnMgr()
TransactionalSystemTransactionCoordinatorgetTxnMgr in interface TransactionalSystempublic TransactionCoordinatorState detach()
TransactionalSystemdetach in interface TransactionalSystempublic void attach(TransactionCoordinatorState coordinatorState)
TransactionalSystemattach in interface TransactionalSystempublic final void begin(ReadWrite readWrite)
begin in interface Transactionalpublic final void begin(TxnType txnType)
begin in interface Transactionalpublic final boolean promote()
promote in interface Transactionalpublic final boolean promote(Transactional.Promote promoteMode)
promote in interface Transactionalpublic final void commit()
commit in interface TransactionalSystemcommit in interface Transactionalpublic void commitPrepare()
TransactionalSystemcommitPrepare in interface TransactionalSystempublic void commitExec()
TransactionalSystemcommitExec in interface TransactionalSystempublic final void abort()
abort in interface Transactionalpublic final void end()
end in interface Transactionalpublic ReadWrite transactionMode()
transactionMode in interface Transactionalpublic TxnType transactionType()
transactionType in interface Transactionalpublic boolean isInTransaction()
isInTransaction in interface Transactionalpublic final TransactionInfo getTransactionInfo()
TransactionalSystemgetTransactionInfo in interface TransactionalSystempublic final Transaction getThreadTransaction()
TransactionalSystemTransactionalSystem.getTransactionInfo().getThreadTransaction in interface TransactionalSystempublic void shutdown()
Licensed under the Apache License, Version 2.0