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>> extends Object
LockManager
,
TxDag
Constructor and Description |
---|
NonBlockingLockManagerWithNewDesign.ResourceQueue(NonBlockingLockManagerWithNewDesign<R> lockService,
R resource)
Create a queue of lock requests for a resource.
|
Modifier and Type | Method and Description |
---|---|
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() . |
public NonBlockingLockManagerWithNewDesign.ResourceQueue(NonBlockingLockManagerWithNewDesign<R> lockService, R resource)
resource
- The resource.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()
.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.