Class AtomicQueueUtil

java.lang.Object
org.jctools.queues.atomic.AtomicQueueUtil

public final class AtomicQueueUtil extends Object
  • Constructor Details

    • AtomicQueueUtil

      public AtomicQueueUtil()
  • Method Details

    • lvRefElement

      public static <E> E lvRefElement(AtomicReferenceArray<E> buffer, int offset)
    • lpRefElement

      public static <E> E lpRefElement(AtomicReferenceArray<E> buffer, int offset)
    • spRefElement

      public static <E> void spRefElement(AtomicReferenceArray<E> buffer, int offset, E value)
    • soRefElement

      public static void soRefElement(AtomicReferenceArray buffer, int offset, Object value)
    • svRefElement

      public static <E> void svRefElement(AtomicReferenceArray<E> buffer, int offset, E value)
    • calcRefElementOffset

      public static int calcRefElementOffset(long index)
    • calcCircularRefElementOffset

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

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

      public static void spLongElement(AtomicLongArray buffer, int offset, long e)
    • soLongElement

      public static void soLongElement(AtomicLongArray buffer, int offset, long e)
    • lpLongElement

      public static long lpLongElement(AtomicLongArray buffer, int offset)
    • lvLongElement

      public static long lvLongElement(AtomicLongArray buffer, int offset)
    • calcLongElementOffset

      public static int calcLongElementOffset(long index)
    • calcCircularLongElementOffset

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

      public static AtomicLongArray allocateLongArray(int capacity)
    • length

      public static int length(AtomicReferenceArray<?> buf)
    • modifiedCalcCircularRefElementOffset

      public static int 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 int nextArrayOffset(AtomicReferenceArray<?> curr)