Module org.apache.lucene.core
Package org.apache.lucene.index
Class LockableConcurrentApproximatePriorityQueue<T extends java.util.concurrent.locks.Lock>
- java.lang.Object
-
- org.apache.lucene.index.LockableConcurrentApproximatePriorityQueue<T>
-
final class LockableConcurrentApproximatePriorityQueue<T extends java.util.concurrent.locks.Lock> extends java.lang.Object
AConcurrentApproximatePriorityQueue
ofLock
objects.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicInteger
addAndUnlockCounter
private ConcurrentApproximatePriorityQueue<T>
queue
-
Constructor Summary
Constructors Constructor Description LockableConcurrentApproximatePriorityQueue()
LockableConcurrentApproximatePriorityQueue(int concurrency)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addAndUnlock(T entry, long weight)
Add an entry to the queue and unlock it, in that order.(package private) boolean
contains(java.lang.Object o)
(package private) T
lockAndPoll()
Lock an entry, and poll it from the queue, in that order.(package private) boolean
remove(java.lang.Object o)
Remove an entry from the queue.
-
-
-
Field Detail
-
queue
private final ConcurrentApproximatePriorityQueue<T extends java.util.concurrent.locks.Lock> queue
-
addAndUnlockCounter
private final java.util.concurrent.atomic.AtomicInteger addAndUnlockCounter
-
-
Method Detail
-
lockAndPoll
T lockAndPoll()
Lock an entry, and poll it from the queue, in that order. If no entry can be found and locked,null
is returned.
-
remove
boolean remove(java.lang.Object o)
Remove an entry from the queue.
-
contains
boolean contains(java.lang.Object o)
-
addAndUnlock
void addAndUnlock(T entry, long weight)
Add an entry to the queue and unlock it, in that order.
-
-