|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.tx.concurrency.LockTable
class LockTable
The lock table, which provides methods to lock and unlock blocks. If a transaction requests a lock that causes a conflict with an existing lock, then that transaction is placed on a wait list. There is only one wait list for all blocks. When the last lock on a block is unlocked, then all transactions are removed from the wait list and rescheduled. If one of those transactions discovers that the lock it is waiting for is still locked, it will place itself back on the wait list.
Constructor Summary | |
---|---|
LockTable()
|
Method Summary | |
---|---|
void |
sLock(Block blk)
Grants an SLock on the specified block. |
(package private) void |
unlock(Block blk)
Releases a lock on the specified block. |
(package private) void |
xLock(Block blk)
Grants an XLock on the specified block. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
LockTable()
Method Detail |
---|
public void sLock(Block blk)
blk
- a reference to the disk blockvoid xLock(Block blk)
blk
- a reference to the disk blockvoid unlock(Block blk)
blk
- a reference to the disk block
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |