Class IntPriorityQueue

java.lang.Object
io.netty.buffer.IntPriorityQueue

final class IntPriorityQueue 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 int[]
     
    static final int
     
    private int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    private void
    lift(int index)
     
    void
    offer(int handle)
     
    int
     
    int
     
    void
    remove(int 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 Details

    • NO_VALUE

      public static final int NO_VALUE
      See Also:
    • array

      private int[] array
    • size

      private int size
  • Constructor Details

    • IntPriorityQueue

      IntPriorityQueue()
  • Method Details

    • offer

      public void offer(int handle)
    • remove

      public void remove(int value)
    • peek

      public int peek()
    • poll

      public int 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)