public class TxnManager
extends java.lang.Object
Constructor and Description |
---|
TxnManager(EnvironmentImpl env) |
Modifier and Type | Method and Description |
---|---|
boolean |
areOtherSerializableTransactionsActive(Locker excludeLocker)
Returns whether there are any active serializable transactions,
excluding the transaction given (if non-null).
|
long |
getFirstActiveLsn()
Get the earliest LSN of all the active transactions, for checkpoint.
|
long |
getLastTxnId()
Get the last used id, for checkpoint info.
|
LockManager |
getLockManager()
Give transactions and environment access to lock manager.
|
Transaction |
getTxnForThread()
Retrieve a Txn object for this Thread.
|
Txn |
getTxnFromXid(javax.transaction.xa.Xid xid)
Retrieve a Txn object from an Xid.
|
LockStats |
lockStat(StatsConfig config)
Collect lock related stats.
|
void |
registerXATxn(javax.transaction.xa.Xid xid,
Txn txn,
boolean isPrepare)
Called when txn is created.
|
void |
setLastTxnId(long lastId)
Set the txn id sequence.
|
void |
setTxnForThread(Transaction txn)
Called when txn is assoc'd with this thread.
|
Txn |
txnBegin(Transaction parent,
TransactionConfig txnConfig)
Create a new transaction.
|
TransactionStats |
txnStat(StatsConfig config)
Collect transaction related stats.
|
Transaction |
unsetTxnForThread()
Called when txn is assoc'd with this thread.
|
javax.transaction.xa.Xid[] |
XARecover() |
public TxnManager(EnvironmentImpl env) throws DatabaseException
DatabaseException
public void setLastTxnId(long lastId)
public long getLastTxnId()
public Txn txnBegin(Transaction parent, TransactionConfig txnConfig) throws DatabaseException
parent
- for nested transactions, not yet supportedtxnConfig
- specifies txn attributesDatabaseException
public LockManager getLockManager()
public void registerXATxn(javax.transaction.xa.Xid xid, Txn txn, boolean isPrepare) throws DatabaseException
DatabaseException
public Txn getTxnFromXid(javax.transaction.xa.Xid xid) throws DatabaseException
DatabaseException
public void setTxnForThread(Transaction txn)
public Transaction unsetTxnForThread() throws DatabaseException
DatabaseException
public Transaction getTxnForThread() throws DatabaseException
DatabaseException
public javax.transaction.xa.Xid[] XARecover() throws DatabaseException
DatabaseException
public boolean areOtherSerializableTransactionsActive(Locker excludeLocker)
public long getFirstActiveLsn() throws DatabaseException
DatabaseException
public TransactionStats txnStat(StatsConfig config) throws DatabaseException
DatabaseException
public LockStats lockStat(StatsConfig config) throws DatabaseException
DatabaseException