public class TxnManager extends Object
| Constructor and Description |
|---|
TxnManager(EnvironmentImpl envImpl) |
| 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 |
getLastLocalTxnId()
Get the last used id, for checkpoint info.
|
long |
getLastReplicatedTxnId() |
LockManager |
getLockManager()
Give transactions and environment access to lock manager.
|
long |
getNextReplicatedTxnId() |
long |
getNTotalCommits()
Returns commit counter that is never cleared (as stats are), so it can
be used for monitoring un-flushed txns.
|
Transaction |
getTxnForThread()
Retrieve a Txn object for this Thread.
|
Txn |
getTxnFromXid(Xid xid)
Retrieve a Txn object from an Xid.
|
<T extends Txn> |
getTxns(Class<T> txnClass)
Examine the transaction set and return Txn that match the class or are
subclasses of that class.
|
static boolean |
isReplicatedTxn(long txnId) |
StatGroup |
loadStats(StatsConfig config) |
LockStats |
lockStat(StatsConfig config)
Collect lock related stats.
|
void |
notePrepare()
Called when XATransaction is prepared.
|
void |
registerTxn(Txn txn)
Called when txn is created.
|
void |
registerXATxn(Xid xid,
Txn txn,
boolean isPrepare)
Called when txn is created.
|
void |
setLastTxnId(long lastReplicatedTxnId,
long lastLocalId)
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.
|
void |
updateFromReplay(long replayTxnId) |
Xid[] |
XARecover() |
public TxnManager(EnvironmentImpl envImpl)
public void setLastTxnId(long lastReplicatedTxnId,
long lastLocalId)
public long getLastLocalTxnId()
public long getLastReplicatedTxnId()
public long getNextReplicatedTxnId()
public static boolean isReplicatedTxn(long txnId)
public void updateFromReplay(long replayTxnId)
public long getNTotalCommits()
public Txn txnBegin(Transaction parent, TransactionConfig txnConfig) throws DatabaseException
parent - for nested transactions, not yet supportedtxnConfig - specifies txn attributesDatabaseExceptionpublic LockManager getLockManager()
public void registerTxn(Txn txn)
public void registerXATxn(Xid xid, Txn txn, boolean isPrepare)
public void notePrepare()
public void setTxnForThread(Transaction txn)
public Transaction unsetTxnForThread()
public Transaction getTxnForThread()
public Xid[] XARecover()
public boolean areOtherSerializableTransactionsActive(Locker excludeLocker)
public long getFirstActiveLsn()
public TransactionStats txnStat(StatsConfig config)
public StatGroup loadStats(StatsConfig config)
public LockStats lockStat(StatsConfig config) throws DatabaseException
DatabaseExceptionCopyright © 2024. All rights reserved.