public class ReadCommittedLocker extends BuddyLocker
defaultNoWait, deleteInfo, envImpl, id, lockManager, readUncommittedDefault, thread
Modifier and Type | Method and Description |
---|---|
void |
addDeleteInfo(BIN bin)
Forwards this method to the transactional buddy.
|
boolean |
createdNode(long lsn)
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, close, createBuddyLocker, getBuddy, getLockTimeout, getTransaction, getTxnLocker, getTxnTimeout, isReplicationDefined, isTimedOut, releaseNonTxnLocks, setLockTimeout, setOnlyAbortable, setTxnTimeout, sharesLocksWith
addLock, checkState, collectStats, createBasicLocker, createBasicLocker, generateId, getWriteOwnerLocker, isSerializableIsolation, markDeleteAtTxnEnd, moveWriteToReadLock, nonTxnOperationEnd, operationEnd, preLogWithoutLock, removeLock
addBuddy, addOpenedDatabase, allowReleaseLockAfterLsnChange, demoteLock, disallowReplicaWrite, dumpLockTable, getDefaultNoWait, getEnvironment, getId, getImportunate, getInitialLockTimeout, getPreemptable, getTxnStartMillis, getWaitingFor, isPreempted, isReadUncommittedDefault, isRolledBack, isValid, lock, lockAfterLsnChange, nonBlockingLock, openCursorHook, operationEnd, operationEnd, removeBuddy, setAllowMultithreadedAccess, setClosingLocker, setImportunate, setPreemptable, setPreempted, setWaitingFor, throwIfPreempted, toString
public static ReadCommittedLocker createReadCommittedLocker(EnvironmentImpl env, Locker buddy) throws DatabaseException
DatabaseException
public Locker newNonTxnLocker() throws DatabaseException
newNonTxnLocker
in class BasicLocker
DatabaseException
- from subclasses.protected LockResult lockInternal(long lsn, LockType lockType, boolean noWait, boolean jumpAheadOfWaiters, DatabaseImpl database) throws DatabaseException
lockInternal
in class BasicLocker
lsn
- 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.DatabaseException
Locker.lockInternal(long, com.sleepycat.je.txn.LockType, boolean, boolean, com.sleepycat.je.dbi.DatabaseImpl)
public boolean releaseLock(long lsn) throws DatabaseException
releaseLock
in class Locker
DatabaseException
public boolean createdNode(long lsn)
createdNode
in class BasicLocker
public WriteLockInfo getWriteLockInfo(long lsn)
getWriteLockInfo
in class BasicLocker
public void addDeleteInfo(BIN bin)
addDeleteInfo
in class Locker
public void registerCursor(CursorImpl cursor)
registerCursor
in class BasicLocker
public void unRegisterCursor(CursorImpl cursor)
unRegisterCursor
in class BasicLocker
public boolean lockingRequired()
lockingRequired
in class BasicLocker
public boolean isTransactional()
isTransactional
in class BasicLocker
public boolean isReadCommittedIsolation()
isReadCommittedIsolation
in class BasicLocker
Copyright (c) 2004-2012 Oracle. All rights reserved.