Class LockableConcurrentApproximatePriorityQueue<T extends java.util.concurrent.locks.Lock>


  • final class LockableConcurrentApproximatePriorityQueue<T extends java.util.concurrent.locks.Lock>
    extends java.lang.Object
    • Field Detail

      • addAndUnlockCounter

        private final java.util.concurrent.atomic.AtomicInteger addAndUnlockCounter
    • Constructor Detail

      • LockableConcurrentApproximatePriorityQueue

        LockableConcurrentApproximatePriorityQueue​(int concurrency)
      • LockableConcurrentApproximatePriorityQueue

        LockableConcurrentApproximatePriorityQueue()
    • 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.