|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.txn.TxnManager
public class TxnManager
Class to manage transactions. Basically a Set of all transactions with add and remove methods and a latch around the set.
Field Summary | |
---|---|
(package private) static long |
NULL_TXN_ID
|
Constructor Summary | |
---|---|
TxnManager(EnvironmentImpl env)
|
Method Summary | |
---|---|
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(Xid xid)
Retrieve a Txn object from an Xid. |
(package private) long |
incTxnId()
Get the next transaction id to use. |
LockStats |
lockStat(StatsConfig config)
Collect lock related stats. |
(package private) 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 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. |
(package private) void |
unRegisterTxn(Txn txn,
boolean isCommit)
Called when txn ends. |
(package private) void |
unRegisterXATxn(Xid xid,
boolean isCommit)
Called when txn ends. |
Transaction |
unsetTxnForThread()
Called when txn is assoc'd with this thread. |
Xid[] |
XARecover()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long NULL_TXN_ID
Constructor Detail |
---|
public TxnManager(EnvironmentImpl env) throws DatabaseException
DatabaseException
Method Detail |
---|
public void setLastTxnId(long lastId)
public long getLastTxnId()
long incTxnId()
public Txn txnBegin(Transaction parent, TransactionConfig txnConfig) throws DatabaseException
parent
- for nested transactions, not yet supportedtxnConfig
- specifies txn attributes
DatabaseException
public LockManager getLockManager()
void registerTxn(Txn txn) throws DatabaseException
DatabaseException
void unRegisterTxn(Txn txn, boolean isCommit) throws DatabaseException
DatabaseException
public void registerXATxn(Xid xid, Txn txn, boolean isPrepare) throws DatabaseException
DatabaseException
void unRegisterXATxn(Xid xid, boolean isCommit) throws DatabaseException
DatabaseException
public Txn getTxnFromXid(Xid xid) throws DatabaseException
DatabaseException
public void setTxnForThread(Transaction txn)
public Transaction unsetTxnForThread() throws DatabaseException
DatabaseException
public Transaction getTxnForThread() throws DatabaseException
DatabaseException
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |