Class VarHandleQueueUtil

java.lang.Object
org.jctools.queues.varhandle.VarHandleQueueUtil

public final class VarHandleQueueUtil extends Object
  • Field Details

    • ARRAY_REF_ELEMENT

      private static final VarHandle ARRAY_REF_ELEMENT
    • ARRAY_LONG_ELEMENT

      private static final VarHandle ARRAY_LONG_ELEMENT
  • Constructor Details

    • VarHandleQueueUtil

      public VarHandleQueueUtil()
  • Method Details

    • lvRefElement

      public static <E> E lvRefElement(E[] buffer, long offset)
    • laRefElement

      public static <E> E laRefElement(E[] buffer, long offset)
    • lpRefElement

      public static <E> E lpRefElement(E[] buffer, long offset)
    • spRefElement

      public static <E> void spRefElement(E[] buffer, long offset, E value)
    • soRefElement

      public static <E> void soRefElement(E[] buffer, long offset, E value)
    • svRefElement

      public static <E> void svRefElement(E[] buffer, long offset, E value)
    • calcRefElementOffset

      public static long calcRefElementOffset(long index)
    • calcCircularRefElementOffset

      public static long calcCircularRefElementOffset(long index, long mask)
    • allocateRefArray

      public static <E> E[] allocateRefArray(int capacity)
    • spLongElement

      public static void spLongElement(long[] buffer, long offset, long e)
    • soLongElement

      public static void soLongElement(long[] buffer, long offset, long e)
    • lpLongElement

      public static long lpLongElement(long[] buffer, long offset)
    • laLongElement

      public static long laLongElement(long[] buffer, long offset)
    • lvLongElement

      public static long lvLongElement(long[] buffer, long offset)
    • calcCircularLongElementOffset

      public static long calcCircularLongElementOffset(long index, long mask)
    • allocateLongArray

      public static long[] allocateLongArray(int capacity)
    • length

      public static int length(Object[] buf)
    • modifiedCalcCircularRefElementOffset

      public static long modifiedCalcCircularRefElementOffset(long index, long mask)
      This method assumes index is actually (index invalid input: '<'invalid input: '<' 1) because lower bit is used for resize hence the >> 1
    • nextArrayOffset

      public static long nextArrayOffset(Object[] curr)