public class ThreadLocker extends BasicLocker
afterWaiterHook, envImpl, id, lockManager, 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.
|
static ThreadLocker |
createThreadLocker(EnvironmentImpl env,
boolean replicated) |
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.
|
ThreadLocker |
newEmptyThreadLockerClone() |
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.
|
addDbCleanup, addLock, collectStats, createBasicLocker, createBasicLocker, generateId, getTxnLocker, getWriteLockInfo, getWriteOwnerLocker, isReadCommittedIsolation, isSerializableIsolation, isTransactional, lockingRequired, lockInternal, nonTxnOperationEnd, operationEnd, preLogWithoutLock, registerCursor, releaseNonTxnLocks, unRegisterCursoraddDeleteInfo, addOpenedDatabase, allowReleaseLockAfterLsnChange, demoteLock, disallowReplicaWrite, dumpLockTable, getDefaultNoWait, getEnvironment, getId, getImportunate, getInitialLockTimeout, getLockTimeout, getPreemptable, getTransaction, getTxnTimeout, isLocalWrite, isReadOnly, isReadUncommittedDefault, isReplicated, isRolledBack, isTimedOut, isValid, lock, nonBlockingLock, openCursorHook, operationEnd, operationEnd, releaseLock, setClosingLocker, setDefaultNoWait, setImportunate, setLockTimeout, setOnlyAbortable, setPreemptable, setPreempted, setTxnTimeout, toStringpublic ThreadLocker(EnvironmentImpl env)
public static ThreadLocker createThreadLocker(EnvironmentImpl env, boolean replicated) throws DatabaseException
DatabaseExceptionpublic 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 BasicLockerIllegalStateException - via all Cursor methods that use a
non-transactional locker.public Locker newNonTxnLocker() throws DatabaseException
newNonTxnLocker in class BasicLockerDatabaseException - from subclasses.public ThreadLocker newEmptyThreadLockerClone()
public boolean sharesLocksWith(Locker other)
sharesLocksWith in class LockerCopyright © 2024. All rights reserved.