|
|||||||||
| 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, handleLockToHandleMap, handleToHandleLockMap, id, lockManager, readUncommittedDefault, thread |
| Method Summary | |
|---|---|
void |
addDeleteInfo(BIN bin,
Key deletedKey)
Forwards this method to the transactional buddy. |
boolean |
createdNode(long nodeId)
Forwards this method to the transactional buddy. |
static ReadCommittedLocker |
createReadCommittedLocker(EnvironmentImpl env,
Locker buddy)
|
long |
getAbortLsn(long nodeId)
Forwards this method to the transactional buddy. |
WriteLockInfo |
getWriteLockInfo(long nodeId)
|
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 nodeId,
LockType lockType,
boolean noWait,
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 nodeId)
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, 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, removeLock, setHandleLockOwner |
| 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 BasicLockerDatabaseException - from subclasses.
protected LockResult lockInternal(long nodeId,
LockType lockType,
boolean noWait,
DatabaseImpl database)
throws DatabaseException
lockInternal in class BasicLockernodeId - 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.database - is the database containing nodeId.
LockConflictException - if a blocking lock could not be acquired.
DatabaseExceptionLocker.lockInternal(long, com.sleepycat.je.txn.LockType, boolean, com.sleepycat.je.dbi.DatabaseImpl)
public boolean releaseLock(long nodeId)
throws DatabaseException
releaseLock in class LockerDatabaseExceptionpublic boolean createdNode(long nodeId)
createdNode in class BasicLockerpublic long getAbortLsn(long nodeId)
getAbortLsn in class BasicLockerpublic WriteLockInfo getWriteLockInfo(long nodeId)
getWriteLockInfo in class BasicLocker
public void addDeleteInfo(BIN bin,
Key deletedKey)
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 BasicLocker
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||