| java.lang.Object com.quadcap.sql.lock.LockManager
LockManager | public class LockManager (Code) | | Manage a hierarchical set of read/write/intention locks.
author: Stan Bailes |
Method Summary | |
void | acquireLock(HeldLock h) | final void | checkParentsLockMode(Transaction t, Lock lock, int mode) Ensure that the lock's parent(s) are properly locked, to enable
locking lock in the specified mode. | final boolean | couldLockWithParentMode(int pmode, int mode) | public Transaction | findTransaction(long transId) Find an existing transaction. | final public Lock | getLock(Transaction t, Lock parent, String name, int mode) Instantiate the specified lock on behalf of transaction 't',
which may or may not already have this lock. | final HeldLock | getLockForTransaction(Transaction t, Lock lock) | final public Transaction | getTransaction(long transId) Allocate a new Transaction. | final Iterator | locksForTransaction(Transaction t) Return an Iterator over the held locks positioned at the first
lock owned by transaction 't'. | void | promoteLock(HeldLock h, int mode) | public void | releaseTransaction(Transaction t) | public String | toString() | public Iterator | transactions() | final Sync | waitForLock(HeldLock h) |
tmpHeld | HeldLock tmpHeld(Code) | | Temp held lock object used for searching
|
LockManager | public LockManager()(Code) | | Constructor
|
checkParentsLockMode | final void checkParentsLockMode(Transaction t, Lock lock, int mode)(Code) | | Ensure that the lock's parent(s) are properly locked, to enable
locking lock in the specified mode.
|
couldLockWithParentMode | final boolean couldLockWithParentMode(int pmode, int mode)(Code) | | |
findTransaction | public Transaction findTransaction(long transId)(Code) | | Find an existing transaction. Return null if the specified
transaction doesn't exist.
|
getLock | final public Lock getLock(Transaction t, Lock parent, String name, int mode) throws SQLException(Code) | | Instantiate the specified lock on behalf of transaction 't',
which may or may not already have this lock.
|
getTransaction | final public Transaction getTransaction(long transId)(Code) | | Allocate a new Transaction. All lock operations are performed
on behalf of a Transaction.
|
locksForTransaction | final Iterator locksForTransaction(Transaction t)(Code) | | Return an Iterator over the held locks positioned at the first
lock owned by transaction 't'.
|
releaseTransaction | public void releaseTransaction(Transaction t)(Code) | | End a transaction, releasing all of its locks
|
transactions | public Iterator transactions()(Code) | | Return an iterator over all active transactions
|
|
|