|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.concurrent.NonBlockingLockManager.ResourceQueue<T>
T - The generic type of the elements in the queue.protected class NonBlockingLockManager.ResourceQueue<T extends NonBlockingLockManager.LockFutureTask<? extends Object>>
Unbounded queue of operations waiting to gain an exclusive lock on a
resource. By default, the queue imposes a "fair" schedule for access to
the resource. Deadlocks among resources are detected using a
WAITS_FOR graph that is shared by all resources and
transactions for a given database instance.
Note: deadlock detection MAY be disabled when all lock requests are (a)
pre-declared; and (b) sorted. When disabled the WAITS_FOR
graph is NOT maintained.
LockManager,
TxDag| Constructor Summary | |
|---|---|
NonBlockingLockManager.ResourceQueue(R resource)
Create a queue of lock requests for a resource. |
|
| Method Summary | |
|---|---|
int |
getQueueSize()
The #of pending requests for a lock on the resource. |
R |
getResource()
The resource whose locks are administeded by this object. |
boolean |
isGranted(T tx)
Return true if the transaction currently holds the lock. |
boolean |
isLocked()
True iff there is a granted group. |
String |
toString()
Note: This uses LinkedBlockingQueue.toString() to serialize
the state of the resource queue so the result will be consistent per
the contract of that method and
LinkedBlockingQueue.iterator(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NonBlockingLockManager.ResourceQueue(R resource)
resource - The resource.| Method Detail |
|---|
public R getResource()
public boolean isLocked()
public int getQueueSize()
public boolean isGranted(T tx)
tx - The transaction.public String toString()
LinkedBlockingQueue.toString() to serialize
the state of the resource queue so the result will be consistent per
the contract of that method and
LinkedBlockingQueue.iterator().
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||