Module org.apache.lucene.core
Package org.apache.lucene.index
Class LockableConcurrentApproximatePriorityQueue<T extends Lock>
java.lang.Object
org.apache.lucene.index.LockableConcurrentApproximatePriorityQueue<T>
A
ConcurrentApproximatePriorityQueue
of Lock
objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicInteger
private final ConcurrentApproximatePriorityQueue
<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addAndUnlock
(T entry, long weight) Add an entry to the queue and unlock it, in that order.(package private) boolean
(package private) T
Lock an entry, and poll it from the queue, in that order.(package private) boolean
Remove an entry from the queue.
-
Field Details
-
queue
-
addAndUnlockCounter
-
-
Constructor Details
-
LockableConcurrentApproximatePriorityQueue
LockableConcurrentApproximatePriorityQueue(int concurrency) -
LockableConcurrentApproximatePriorityQueue
LockableConcurrentApproximatePriorityQueue()
-
-
Method Details
-
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
Remove an entry from the queue. -
contains
-
addAndUnlock
Add an entry to the queue and unlock it, in that order.
-