|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.concurrent.NonBlockingLockManagerWithNewDesign.ResourceQueue<R,T>
T - The generic type of the elements in the queue.protected static class NonBlockingLockManagerWithNewDesign.ResourceQueue<R extends Comparable<R>,T extends NonBlockingLockManagerWithNewDesign.LockFutureTask<R,? extends Object>>
Unbounded queue of operations waiting to gain an exclusive lock on a resource.
LockManager,
TxDag| Constructor Summary | |
|---|---|
NonBlockingLockManagerWithNewDesign.ResourceQueue(NonBlockingLockManagerWithNewDesign<R> lockService,
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 NonBlockingLockManagerWithNewDesign.ResourceQueue(NonBlockingLockManagerWithNewDesign<R> lockService,
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 | |||||||||