public class ReadCommittedLocker extends BuddyLocker
afterWaiterHook, envImpl, id, lockManager, thread| Modifier and Type | Method and Description |
|---|---|
void |
addDbCleanup(DbCleanup cleanup)
Write operations are handled by the buddy Txn.
|
void |
addDeleteInfo(BIN bin)
Forwards this method to the transactional buddy.
|
static ReadCommittedLocker |
createReadCommittedLocker(EnvironmentImpl env,
Locker buddy) |
WriteLockInfo |
getWriteLockInfo(long lsn) |
boolean |
isReadCommittedIsolation()
Is always read-committed isolation.
|
boolean |
isTransactional()
Is always transactional because the buddy locker is transactional.
|
boolean |
lockingRequired()
ReadCommittedLockers always require locking.
|
protected LockResult |
lockInternal(long lsn,
LockType lockType,
boolean noWait,
boolean jumpAheadOfWaiters,
DatabaseImpl database)
Forwards write locks to the buddy locker (the transaction locker).
|
Locker |
newNonTxnLocker()
Returns a new ReadCommittedLocker that shares locks with this locker by
virtue of both lockers only holding READ locks.
|
void |
registerCursor(CursorImpl cursor)
Forwards this method to the transactional buddy.
|
boolean |
releaseLock(long lsn)
Releases the lock from this locker, or if not owned by this locker then
releases it from the buddy locker.
|
void |
unRegisterCursor(CursorImpl cursor)
Forwards this method to the transactional buddy.
|
checkPreempted, createBuddyLocker, getLockTimeout, getTransaction, getTxnLocker, getTxnStartMillis, getTxnTimeout, isLocalWrite, isReplicated, isTimedOut, releaseNonTxnLocks, setLockTimeout, setOnlyAbortable, setTxnTimeout, sharesLocksWithaddLock, checkState, collectStats, createBasicLocker, createBasicLocker, generateId, getWriteOwnerLocker, isSerializableIsolation, nonTxnOperationEnd, operationEnd, preLogWithoutLockaddOpenedDatabase, allowReleaseLockAfterLsnChange, demoteLock, disallowReplicaWrite, dumpLockTable, getDefaultNoWait, getEnvironment, getId, getImportunate, getInitialLockTimeout, getPreemptable, isReadOnly, isReadUncommittedDefault, isRolledBack, isValid, lock, lockAfterLsnChange, nonBlockingLock, openCursorHook, operationEnd, operationEnd, setClosingLocker, setDefaultNoWait, setImportunate, setPreemptable, setPreempted, toStringpublic static ReadCommittedLocker createReadCommittedLocker(EnvironmentImpl env, Locker buddy) throws DatabaseException
DatabaseExceptionpublic Locker newNonTxnLocker() throws DatabaseException
newNonTxnLocker in class BasicLockerDatabaseException - from subclasses.protected LockResult lockInternal(long lsn, LockType lockType, boolean noWait, boolean jumpAheadOfWaiters, DatabaseImpl database) throws DatabaseException
lockInternal in class BasicLockerlsn - is the node to lock.lockType - is the type of lock to request.noWait - is true to override the defaultNoWait setting. If true,
or if defaultNoWait is true, throws LockNotAvailableException if the
lock cannot be granted without waiting.jumpAheadOfWaiters - grant the lock before other waiters, if any.database - is the database containing lsn.LockConflictException - if a blocking lock could not be acquired.DatabaseExceptionLocker.lockInternal(long, com.sleepycat.je.txn.LockType, boolean, boolean, com.sleepycat.je.dbi.DatabaseImpl)public boolean releaseLock(long lsn)
throws DatabaseException
releaseLock in class LockerDatabaseExceptionpublic WriteLockInfo getWriteLockInfo(long lsn)
getWriteLockInfo in class BasicLockerpublic void addDbCleanup(DbCleanup cleanup)
addDbCleanup in class BasicLockerpublic void addDeleteInfo(BIN bin)
addDeleteInfo in class Lockerpublic void registerCursor(CursorImpl cursor)
registerCursor in class BasicLockerpublic void unRegisterCursor(CursorImpl cursor)
unRegisterCursor in class BasicLockerpublic boolean lockingRequired()
lockingRequired in class BasicLockerpublic boolean isTransactional()
isTransactional in class BasicLockerpublic boolean isReadCommittedIsolation()
isReadCommittedIsolation in class BasicLockerCopyright © 2024. All rights reserved.