public class TxnManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static long |
NULL_TXN_ID |
| 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() |
(package private) long |
getNextTxnId()
Get the next transaction id to use.
|
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 |
notePrepare()
Called when XATransaction is prepared.
|
(package private) void |
registerTxn(Txn txn)
Called when txn is created.
|
void |
registerXATxn(javax.transaction.xa.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.
|
(package private) void |
unRegisterTxn(Txn txn,
boolean isCommit)
Called when txn ends.
|
(package private) void |
unRegisterXATxn(javax.transaction.xa.Xid xid,
boolean isCommit)
Called when txn ends.
|
Transaction |
unsetTxnForThread()
Called when txn is assoc'd with this thread.
|
void |
updateFromReplay(long replayTxnId) |
javax.transaction.xa.Xid[] |
XARecover() |
static final long NULL_TXN_ID
public TxnManager(EnvironmentImpl envImpl) throws DatabaseException
DatabaseExceptionpublic void setLastTxnId(long lastReplicatedTxnId,
long lastLocalId)
public long getLastLocalTxnId()
public long getLastReplicatedTxnId()
public long getNextReplicatedTxnId()
long getNextTxnId()
public void updateFromReplay(long replayTxnId)
public Txn txnBegin(Transaction parent, TransactionConfig txnConfig) throws DatabaseException
parent - for nested transactions, not yet supportedtxnConfig - specifies txn attributesDatabaseExceptionpublic LockManager getLockManager()
void registerTxn(Txn txn) throws DatabaseException
DatabaseExceptionvoid unRegisterTxn(Txn txn, boolean isCommit) throws DatabaseException
DatabaseExceptionpublic void registerXATxn(javax.transaction.xa.Xid xid,
Txn txn,
boolean isPrepare)
throws DatabaseException
DatabaseExceptionpublic void notePrepare()
void unRegisterXATxn(javax.transaction.xa.Xid xid,
boolean isCommit)
throws DatabaseException
DatabaseExceptionpublic Txn getTxnFromXid(javax.transaction.xa.Xid xid) throws DatabaseException
DatabaseExceptionpublic void setTxnForThread(Transaction txn)
public Transaction unsetTxnForThread() throws DatabaseException
DatabaseExceptionpublic Transaction getTxnForThread() throws DatabaseException
DatabaseExceptionpublic javax.transaction.xa.Xid[] XARecover()
throws DatabaseException
DatabaseExceptionpublic boolean areOtherSerializableTransactionsActive(Locker excludeLocker)
public long getFirstActiveLsn()
throws DatabaseException
DatabaseExceptionpublic TransactionStats txnStat(StatsConfig config) throws DatabaseException
DatabaseExceptionpublic LockStats lockStat(StatsConfig config) throws DatabaseException
DatabaseExceptionCopyright (c) 2004,2008 Oracle. All rights reserved.