com.sleepycat.je.txn
Class ThreadLocker
java.lang.Object
com.sleepycat.je.txn.Locker
com.sleepycat.je.txn.BasicLocker
com.sleepycat.je.txn.ThreadLocker
public class ThreadLocker
- extends BasicLocker
Extends BasicLocker to share locks among all lockers for the same thread.
This locker is used when a JE entry point is called with a null transaction
parameter.
| Methods inherited from class com.sleepycat.je.txn.BasicLocker |
addLock, collectStats, createBasicLocker, createBasicLocker, createBasicLocker, createdNode, generateId, getAbortLsn, getTxnLocker, getWriteLockInfo, getWriteOwnerLocker, isReadCommittedIsolation, isSerializableIsolation, isTransactional, lockInternal, markDeleteAtTxnEnd, moveWriteToReadLock, nonTxnOperationEnd, operationEnd, registerCursor, releaseNonTxnLocks, removeLock, setHandleLockOwner, unRegisterCursor |
| Methods inherited from class com.sleepycat.je.txn.Locker |
addDeleteInfo, addToHandleMaps, close, demoteLock, dumpLockTable, getDefaultNoWait, getId, getLockTimeout, getTxnStartMillis, getTxnTimeout, getWaitingFor, initApiReadLock, isHandleLockTransferrable, isReadUncommittedDefault, isTimedOut, lock, nonBlockingLock, operationEnd, operationEnd, releaseLock, setLockTimeout, setOnlyAbortable, setTxnTimeout, setWaitingFor, toString, transferHandleLock, transferHandleLockToHandle, unregisterHandle |
createThreadLocker
public static ThreadLocker createThreadLocker(EnvironmentImpl env)
throws DatabaseException
- Throws:
DatabaseException
checkState
protected void checkState(boolean ignoreCalledByAbort)
throws DatabaseException
- Check that this txn is not used in the wrong thread.
- Overrides:
checkState in class BasicLocker
- Throws:
DatabaseException
newNonTxnLocker
public Locker newNonTxnLocker()
throws DatabaseException
- Returns a new non-transactional locker that shares locks with this
locker by virtue of being a ThreadLocker for the same thread.
- Overrides:
newNonTxnLocker in class BasicLocker
- Throws:
DatabaseException
sharesLocksWith
public boolean sharesLocksWith(Locker other)
- Returns whether this locker can share locks with the given locker.
Locks are shared when both are txns are ThreadLocker instances for the
same thread.
- Overrides:
sharesLocksWith in class Locker
Copyright (c) 2004,2008 Oracle. All rights reserved.