public class ThreadLocker extends BasicLocker
defaultNoWait, deleteInfo, envImpl, id, lockManager, readUncommittedDefault, thread| Constructor and Description |
|---|
ThreadLocker(EnvironmentImpl env)
Creates a ThreadLocker.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
void |
lockAfterLsnChange(long oldLsn,
long newLsn,
DatabaseImpl dbImpl)
Set the allowMultithreadedAccess mode during execution of this method
because a ThreadLocker is not normally allowed to perform locking from
more than one thread.
|
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.
|
addLock, collectStats, createBasicLocker, createBasicLocker, createdNode, generateId, getTxnLocker, getWriteLockInfo, getWriteOwnerLocker, isReadCommittedIsolation, isSerializableIsolation, isTransactional, lockingRequired, lockInternal, markDeleteAtTxnEnd, moveWriteToReadLock, nonTxnOperationEnd, operationEnd, preLogWithoutLock, registerCursor, releaseNonTxnLocks, removeLock, unRegisterCursoraddBuddy, addDeleteInfo, addOpenedDatabase, allowReleaseLockAfterLsnChange, demoteLock, disallowReplicaWrite, dumpLockTable, getDefaultNoWait, getEnvironment, getId, getImportunate, getInitialLockTimeout, getLockTimeout, getPreemptable, getTransaction, getTxnStartMillis, getTxnTimeout, getWaitingFor, isPreempted, isReadUncommittedDefault, isReplicationDefined, isRolledBack, isTimedOut, isValid, lock, nonBlockingLock, openCursorHook, operationEnd, operationEnd, releaseLock, removeBuddy, setAllowMultithreadedAccess, setClosingLocker, setImportunate, setLockTimeout, setOnlyAbortable, setPreemptable, setPreempted, setTxnTimeout, setWaitingFor, throwIfPreempted, toStringpublic ThreadLocker(EnvironmentImpl env)
public static ThreadLocker createThreadLocker(EnvironmentImpl env) throws DatabaseException
DatabaseExceptionvoid close()
Lockerpublic void checkPreempted(Locker allowPreemptedLocker) throws OperationFailureException
checkPreempted in class LockerallowPreemptedLocker - 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.OperationFailureExceptionpublic void lockAfterLsnChange(long oldLsn,
long newLsn,
DatabaseImpl dbImpl)
lockAfterLsnChange in class Lockerprotected void checkState(boolean ignoreCalledByAbort)
checkState in class BasicLockerjava.lang.IllegalStateException - via all Cursor methods that use a
non-transactional locker.public Locker newNonTxnLocker() throws DatabaseException
newNonTxnLocker in class BasicLockerDatabaseException - from subclasses.public boolean sharesLocksWith(Locker other)
sharesLocksWith in class LockerCopyright (c) 2004-2012 Oracle. All rights reserved.