Class LongPriorityQueue


  • final class LongPriorityQueue
    extends java.lang.Object
    Internal primitive priority queue, used by PoolChunk. The implementation is based on the binary heap, as described in Algorithms by Sedgewick and Wayne.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long[] array  
      static int NO_VALUE  
      private int size  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEmpty()  
      private void lift​(int index)  
      void offer​(long handle)  
      long peek()  
      long poll()  
      void remove​(long value)  
      private void sink​(int index)  
      private boolean subord​(int a, int b)  
      private void swap​(int a, int b)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • array

        private long[] array
      • size

        private int size
    • Constructor Detail

      • LongPriorityQueue

        LongPriorityQueue()
    • Method Detail

      • offer

        public void offer​(long handle)
      • remove

        public void remove​(long value)
      • peek

        public long peek()
      • poll

        public long poll()
      • isEmpty

        public boolean isEmpty()
      • lift

        private void lift​(int index)
      • sink

        private void sink​(int index)
      • subord

        private boolean subord​(int a,
                               int b)
      • swap

        private void swap​(int a,
                          int b)