Package org.jctools.queues.atomic
Class AtomicQueueUtil
java.lang.Object
org.jctools.queues.atomic.AtomicQueueUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AtomicLongArray
allocateLongArray
(int capacity) static <E> AtomicReferenceArray
<E> allocateRefArray
(int capacity) static int
calcCircularLongElementOffset
(long index, int mask) static int
calcCircularRefElementOffset
(long index, long mask) static int
calcLongElementOffset
(long index) static int
calcRefElementOffset
(long index) static int
length
(AtomicReferenceArray<?> buf) static long
lpLongElement
(AtomicLongArray buffer, int offset) static <E> E
lpRefElement
(AtomicReferenceArray<E> buffer, int offset) static long
lvLongElement
(AtomicLongArray buffer, int offset) static <E> E
lvRefElement
(AtomicReferenceArray<E> buffer, int offset) 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 >> 1static int
nextArrayOffset
(AtomicReferenceArray<?> curr) static void
soLongElement
(AtomicLongArray buffer, int offset, long e) static void
soRefElement
(AtomicReferenceArray buffer, int offset, Object value) static void
spLongElement
(AtomicLongArray buffer, int offset, long e) static <E> void
spRefElement
(AtomicReferenceArray<E> buffer, int offset, E value) static <E> void
svRefElement
(AtomicReferenceArray<E> buffer, int offset, E value)
-
Constructor Details
-
AtomicQueueUtil
public AtomicQueueUtil()
-
-
Method Details
-
lvRefElement
-
lpRefElement
-
spRefElement
-
soRefElement
-
svRefElement
-
calcRefElementOffset
public static int calcRefElementOffset(long index) -
calcCircularRefElementOffset
public static int calcCircularRefElementOffset(long index, long mask) -
allocateRefArray
-
spLongElement
-
soLongElement
-
lpLongElement
-
lvLongElement
-
calcLongElementOffset
public static int calcLongElementOffset(long index) -
calcCircularLongElementOffset
public static int calcCircularLongElementOffset(long index, int mask) -
allocateLongArray
-
length
-
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
-