T
- The generic type of the elements in the queue.protected class NonBlockingLockManager.ResourceQueue<T extends NonBlockingLockManager.LockFutureTask<? extends Object>> extends Object
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 and Description |
---|
NonBlockingLockManager.ResourceQueue(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 NonBlockingLockManager.ResourceQueue(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.