|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.txn.Locker
com.sleepycat.je.txn.BasicLocker
com.sleepycat.je.txn.ThreadLocker
public class ThreadLocker
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.
Field Summary |
---|
Fields inherited from class com.sleepycat.je.txn.Locker |
---|
defaultNoWait, deleteInfo, envImpl, handleLockToHandleMap, handleToHandleLockMap, id, lockManager, readUncommittedDefault, thread |
Constructor Summary | |
---|---|
ThreadLocker(EnvironmentImpl env)
Creates a ThreadLocker. |
Method Summary | |
---|---|
(package private) void |
checkPreempted(Locker allowPreemptedLocker)
Checks for preemption in all thread lockers for this thread. |
protected void |
checkState(boolean ignoreCalledByAbort)
Check that this locker is not used in the wrong thread. |
(package private) void |
close()
Should be called by all subclasses when the locker is no longer used. |
static ThreadLocker |
createThreadLocker(EnvironmentImpl env)
|
Locker |
newNonTxnLocker()
Returns a new non-transactional locker that shares locks with this locker by virtue of being a ThreadLocker for the same thread. |
boolean |
sharesLocksWith(Locker other)
Returns whether this locker can share locks with the given locker. |
Methods inherited from class com.sleepycat.je.txn.BasicLocker |
---|
addLock, collectStats, createBasicLocker, createBasicLocker, createdNode, generateId, getAbortLsn, getTxnLocker, getWriteLockInfo, getWriteOwnerLocker, isReadCommittedIsolation, isSerializableIsolation, isTransactional, lockingRequired, lockInternal, markDeleteAtTxnEnd, moveWriteToReadLock, nonTxnOperationEnd, operationEnd, registerCursor, releaseNonTxnLocks, removeLock, setHandleLockOwner, unRegisterCursor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ThreadLocker(EnvironmentImpl env)
Method Detail |
---|
public static ThreadLocker createThreadLocker(EnvironmentImpl env) throws DatabaseException
DatabaseException
void close()
Locker
close
in class Locker
void checkPreempted(Locker allowPreemptedLocker) throws OperationFailureException
checkPreempted
in class Locker
allowPreemptedLocker
- is a locker that is being closed as the
result of a cursor move operation. If the operation is successful then
allowPreemptedLocker will be closed, and the fact that a lock has been
stolen from allowPreemptedLocker can be ignored.
OperationFailureException
protected void checkState(boolean ignoreCalledByAbort)
checkState
in class BasicLocker
IllegalStateException
- via all Cursor methods that use a
non-transactional locker.public Locker newNonTxnLocker() throws DatabaseException
newNonTxnLocker
in class BasicLocker
DatabaseException
- from subclasses.public boolean sharesLocksWith(Locker other)
sharesLocksWith
in class Locker
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |