|
|||||||||
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.BuddyLocker
com.sleepycat.je.txn.ReadCommittedLocker
public class ReadCommittedLocker
Extends BuddyLocker to acquire write locks using the buddy locker (the transaction locker). This is used for ReadCommitted (Degree 2) isolation.
Field Summary |
---|
Fields inherited from class com.sleepycat.je.txn.Locker |
---|
defaultNoWait, deleteInfo, envImpl, id, lockManager, readUncommittedDefault, thread |
Method Summary | |
---|---|
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. |
Methods inherited from class com.sleepycat.je.txn.BuddyLocker |
---|
checkPreempted, close, createBuddyLocker, getBuddy, getLockTimeout, getTransaction, getTxnLocker, getTxnTimeout, isReplicationDefined, isTimedOut, releaseNonTxnLocks, setLockTimeout, setOnlyAbortable, setTxnTimeout, sharesLocksWith |
Methods inherited from class com.sleepycat.je.txn.BasicLocker |
---|
addLock, checkState, collectStats, createBasicLocker, createBasicLocker, generateId, getWriteOwnerLocker, isSerializableIsolation, markDeleteAtTxnEnd, moveWriteToReadLock, nonTxnOperationEnd, operationEnd, preLogWithoutLock, removeLock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |