|
|||||||||
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.SyncedLockManager
public class SyncedLockManager
SyncedLockManager uses the synchronized keyword to implement its critical sections.
Field Summary |
---|
Fields inherited from class com.sleepycat.je.txn.LockManager |
---|
lockTableLatches, nLockTables, TOTAL_LOCKIMPL_OVERHEAD, TOTAL_THINLOCKIMPL_OVERHEAD |
Constructor Summary | |
---|---|
SyncedLockManager(EnvironmentImpl envImpl)
|
Method Summary | |
---|---|
(package private) 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. |
(package private) void |
dumpLockTable(StatGroup stats,
boolean clear)
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. |
(package private) Lock |
lookupLock(Long nodeId)
|
(package private) LockConflictException |
makeTimeoutMsg(boolean isLockNotTxnTimeout,
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. |
(package private) Set<Locker> |
releaseAndFindNotifyTargets(long nodeId,
Locker locker)
Release the lock, and return the set of new owners to notify, if any. |
protected LockAttemptResult |
stealLock(Long nodeId,
Locker locker,
LockType lockType,
MemoryBudget mb)
|
(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. |
(package private) 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 SyncedLockManager(EnvironmentImpl envImpl)
Method Detail |
---|
Lock lookupLock(Long nodeId)
lookupLock
in class LockManager
LockManager.attemptLock(java.lang.Long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.LockType, boolean)
LockAttemptResult attemptLock(Long nodeId, Locker locker, LockType type, boolean nonBlockingRequest) throws DatabaseException
attemptLock
in class LockManager
DatabaseException
LockManager.attemptLock(java.lang.Long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.LockType, boolean)
LockConflictException makeTimeoutMsg(boolean isLockNotTxnTimeout, Locker locker, long nodeId, LockType type, LockGrantType grantType, Lock useLock, long timeout, long start, long now, DatabaseImpl database)
LockManager
makeTimeoutMsg
in class LockManager
LockManager.makeTimeoutMsg(boolean, 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)
Set<Locker> releaseAndFindNotifyTargets(long nodeId, Locker locker)
LockManager
releaseAndFindNotifyTargets
in class LockManager
LockManager#releaseAndNotifyTargets
void transfer(long nodeId, Locker owningLocker, Locker destLocker, boolean demoteToRead) throws DatabaseException
LockManager
transfer
in class LockManager
DatabaseException
LockManager.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 LockManager
DatabaseException
LockManager.transferMultiple(long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.Locker[])
void demote(long nodeId, Locker locker)
LockManager
demote
in class LockManager
LockManager.demote(long, com.sleepycat.je.txn.Locker)
boolean isLocked(Long nodeId)
LockManager
isLocked
in class LockManager
nodeId
- The NodeId to check.
LockManager.isLocked(java.lang.Long)
boolean isOwner(Long nodeId, Locker locker, LockType type)
LockManager
isOwner
in class LockManager
LockManager.isOwner(java.lang.Long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.LockType)
boolean isWaiter(Long nodeId, Locker locker)
LockManager
isWaiter
in class LockManager
LockManager.isWaiter(java.lang.Long, com.sleepycat.je.txn.Locker)
int nWaiters(Long nodeId)
LockManager
nWaiters
in class LockManager
LockManager.nWaiters(java.lang.Long)
int nOwners(Long nodeId)
LockManager
nOwners
in class LockManager
LockManager.nOwners(java.lang.Long)
Locker getWriteOwnerLocker(Long nodeId)
getWriteOwnerLocker
in class LockManager
LockManager#getWriterOwnerLocker
boolean validateOwnership(Long nodeId, Locker locker, LockType type, boolean flushFromWaiters, MemoryBudget mb)
validateOwnership
in class LockManager
LockManager.validateOwnership(java.lang.Long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.LockType, boolean, com.sleepycat.je.dbi.MemoryBudget)
protected LockAttemptResult stealLock(Long nodeId, Locker locker, LockType lockType, MemoryBudget mb) throws DatabaseException
stealLock
in class LockManager
DatabaseException
LockManager.stealLock(java.lang.Long, com.sleepycat.je.txn.Locker, com.sleepycat.je.txn.LockType, com.sleepycat.je.dbi.MemoryBudget)
void dumpLockTable(StatGroup stats, boolean clear)
LockManager
dumpLockTable
in class LockManager
LockManager.dumpLockTable(com.sleepycat.je.utilint.StatGroup, boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |