|
|||||||||
| 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, lockTimeOutMillis, readUncommittedDefault, thread |
| Constructor Summary | |
|---|---|
ReadCommittedLocker(EnvironmentImpl env,
Locker buddy)
Creates a ReadCommittedLocker. |
|
| 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. |
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. |
(package private) LockResult |
lockInternal(long nodeId,
LockType lockType,
boolean noWait,
DatabaseImpl database)
Forwards write locks to the buddy locker (the transaction locker). |
Locker |
newNonTxnLocker()
Creates a new instance of this txn for the same environment. |
void |
registerCursor(CursorImpl cursor)
Forwards this method to the transactional buddy. |
void |
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 |
|---|
getBuddy, getTxnLocker, releaseNonTxnLocks, sharesLocksWith |
| Methods inherited from class com.sleepycat.je.txn.BasicLocker |
|---|
addLock, checkState, collectStats, generateId, getOwnerAbortLsn, getWriteOwnerLocker, isSerializableIsolation, markDeleteAtTxnEnd, moveWriteToReadLock, operationEnd, operationEnd, removeLock, setHandleLockOwner |
| Methods inherited from class com.sleepycat.je.txn.Locker |
|---|
addToHandleMaps, demoteLock, dumpLockTable, getDefaultNoWait, getId, getLockTimeout, getTxnStartMillis, getTxnTimeOut, getWaitingFor, isHandleLockTransferrable, isReadUncommittedDefault, isTimedOut, lock, nonBlockingLock, operationEnd, rememberHandleWriteLock, setLockTimeout, setOnlyAbortable, setTxnTimeout, setWaitingFor, toString, transferHandleLock, transferHandleLockToHandle, unregisterHandle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReadCommittedLocker(EnvironmentImpl env,
Locker buddy)
throws DatabaseException
buddy - is a transactional locker that will be used for acquiring
write locks.
DatabaseException| Method Detail |
|---|
public Locker newNonTxnLocker()
throws DatabaseException
newNonTxnLocker in class BuddyLockerDatabaseException
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 LockNotGrantedException if the lock
cannot be granted without waiting.database - is the database containing nodeId.
DeadlockException - if acquiring a blocking lock would result in a
deadlock.
DatabaseExceptionLocker.lockInternal(long, com.sleepycat.je.txn.LockType, boolean, com.sleepycat.je.dbi.DatabaseImpl)
public void releaseLock(long nodeId)
throws DatabaseException
releaseLock in class LockerDatabaseException
public boolean createdNode(long nodeId)
throws DatabaseException
createdNode in class BasicLockerDatabaseException
public long getAbortLsn(long nodeId)
throws DatabaseException
getAbortLsn in class BasicLockerDatabaseException
public WriteLockInfo getWriteLockInfo(long nodeId)
throws DatabaseException
getWriteLockInfo in class BasicLockerDatabaseException
public void addDeleteInfo(BIN bin,
Key deletedKey)
throws DatabaseException
addDeleteInfo in class LockerDatabaseException
public void registerCursor(CursorImpl cursor)
throws DatabaseException
registerCursor in class BasicLockerDatabaseException
public void unRegisterCursor(CursorImpl cursor)
throws DatabaseException
unRegisterCursor in class BasicLockerDatabaseExceptionpublic 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 | ||||||||