|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sleepycat.je.txn.LockManager
com.sleepycat.je.txn.LatchedLockManager
public class LatchedLockManager
LatchedLockManager uses latches to implement its critical sections.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sleepycat.je.txn.LockManager |
|---|
LockManager.LockAttemptResult |
| Field Summary |
|---|
| Fields inherited from class com.sleepycat.je.txn.LockManager |
|---|
lockTableLatches, nLockTables, TOTAL_LOCK_OVERHEAD |
| Constructor Summary | |
|---|---|
LatchedLockManager(EnvironmentImpl envImpl)
|
|
| Method Summary | |
|---|---|
protected LockManager.LockAttemptResult |
attemptLock(Long nodeId,
Locker locker,
LockType type,
boolean nonBlockingRequest)
|
(package private) void |
demote(long nodeId,
Locker locker)
Demote a lock from write to read. |
protected void |
dumpLockTable(LockStats stats)
Dump the lock table to the lock stats. |
(package private) Locker |
getWriteOwnerLocker(Long nodeId)
|
(package private) boolean |
isLocked(Long nodeId)
Test the status of the lock on nodeId. |
(package private) boolean |
isOwner(Long nodeId,
Locker locker,
LockType type)
Return true if this locker owns this a lock of this type on given node. |
(package private) boolean |
isWaiter(Long nodeId,
Locker locker)
Return true if this locker is waiting on this lock. |
protected String |
makeTimeoutMsg(String lockOrTxn,
Locker locker,
long nodeId,
LockType type,
LockGrantType grantType,
Lock useLock,
long timeout,
long start,
long now,
DatabaseImpl database)
Create a informative lock or txn timeout message. |
(package private) int |
nOwners(Long nodeId)
Return the number of owners of this lock. |
(package private) int |
nWaiters(Long nodeId)
Return the number of waiters for this lock. |
protected Set |
releaseAndFindNotifyTargets(long nodeId,
Lock lock,
Locker locker,
boolean removeFromLocker)
Release the lock, and return the set of new owners to notify, if any. |
(package private) void |
transfer(long nodeId,
Locker owningLocker,
Locker destLocker,
boolean demoteToRead)
Transfer ownership a lock from one locker to another locker. |
(package private) void |
transferMultiple(long nodeId,
Locker owningLocker,
Locker[] destLockers)
Transfer ownership a lock from one locker to a set of other txns, cloning the lock as necessary. |
protected boolean |
validateOwnership(Long nodeId,
Locker locker,
LockType type,
boolean flushFromWaiters,
MemoryBudget mb)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LatchedLockManager(EnvironmentImpl envImpl)
throws DatabaseException
DatabaseException| Method Detail |
|---|
protected LockManager.LockAttemptResult attemptLock(Long nodeId,
Locker locker,
LockType type,
boolean nonBlockingRequest)
throws DatabaseException
attemptLock in class LockManagerDatabaseExceptionLockManager.attemptLock(java.lang.Long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.LockType, boolean)
protected String makeTimeoutMsg(String lockOrTxn,
Locker locker,
long nodeId,
LockType type,
LockGrantType grantType,
Lock useLock,
long timeout,
long start,
long now,
DatabaseImpl database)
throws DatabaseException
LockManager
makeTimeoutMsg in class LockManagerDatabaseExceptionLockManager.makeTimeoutMsg(java.lang.String, com.sleepycat.je.txn.Locker, long, com.sleepycat.je.txn.LockType, com.sleepycat.je.txn.LockGrantType, com.sleepycat.je.txn.Lock, long, long, long, com.sleepycat.je.dbi.DatabaseImpl)
protected Set releaseAndFindNotifyTargets(long nodeId,
Lock lock,
Locker locker,
boolean removeFromLocker)
throws DatabaseException
LockManager
releaseAndFindNotifyTargets in class LockManagerDatabaseExceptionLockManager#releaseAndNotifyTargets
void transfer(long nodeId,
Locker owningLocker,
Locker destLocker,
boolean demoteToRead)
throws DatabaseException
LockManager
transfer in class LockManagerDatabaseExceptionLockManager.transfer(long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.Locker, boolean)
void transferMultiple(long nodeId,
Locker owningLocker,
Locker[] destLockers)
throws DatabaseException
LockManager
transferMultiple in class LockManagerDatabaseExceptionLockManager.transferMultiple(long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.Locker[])
void demote(long nodeId,
Locker locker)
throws DatabaseException
LockManager
demote in class LockManagerDatabaseExceptionLockManager.demote(long, com.sleepycat.je.txn.Locker)
boolean isLocked(Long nodeId)
throws DatabaseException
LockManager
isLocked in class LockManagernodeId - The NodeId to check.
DatabaseExceptionLockManager.isLocked(java.lang.Long)
boolean isOwner(Long nodeId,
Locker locker,
LockType type)
throws DatabaseException
LockManager
isOwner in class LockManagerDatabaseExceptionLockManager.isOwner(java.lang.Long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.LockType)
boolean isWaiter(Long nodeId,
Locker locker)
throws DatabaseException
LockManager
isWaiter in class LockManagerDatabaseExceptionLockManager.isWaiter(java.lang.Long, com.sleepycat.je.txn.Locker)
int nWaiters(Long nodeId)
throws DatabaseException
LockManager
nWaiters in class LockManagerDatabaseExceptionLockManager.nWaiters(java.lang.Long)
int nOwners(Long nodeId)
throws DatabaseException
LockManager
nOwners in class LockManagerDatabaseExceptionLockManager.nOwners(java.lang.Long)
Locker getWriteOwnerLocker(Long nodeId)
throws DatabaseException
getWriteOwnerLocker in class LockManagerDatabaseExceptionLockManager#getWriterOwnerLocker
protected boolean validateOwnership(Long nodeId,
Locker locker,
LockType type,
boolean flushFromWaiters,
MemoryBudget mb)
throws DatabaseException
validateOwnership in class LockManagerDatabaseExceptionLockManager.validateOwnership(java.lang.Long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.LockType, boolean, com.sleepycat.je.dbi.MemoryBudget)
protected void dumpLockTable(LockStats stats)
throws DatabaseException
LockManager
dumpLockTable in class LockManagerDatabaseExceptionLockManager.dumpLockTable(com.sleepycat.je.LockStats)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||