Class AtomicQueueUtil
java.lang.Object
org.jctools.queues.atomic.AtomicQueueUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AtomicLongArrayallocateLongArray(int capacity) static <E> AtomicReferenceArray<E> allocateRefArray(int capacity) static intcalcCircularLongElementOffset(long index, int mask) static intcalcCircularRefElementOffset(long index, long mask) static intcalcLongElementOffset(long index) static intcalcRefElementOffset(long index) static intlength(AtomicReferenceArray<?> buf) static longlpLongElement(AtomicLongArray buffer, int offset) static <E> ElpRefElement(AtomicReferenceArray<E> buffer, int offset) static longlvLongElement(AtomicLongArray buffer, int offset) static <E> ElvRefElement(AtomicReferenceArray<E> buffer, int offset) static intmodifiedCalcCircularRefElementOffset(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 intnextArrayOffset(AtomicReferenceArray<?> curr) static voidsoLongElement(AtomicLongArray buffer, int offset, long e) static voidsoRefElement(AtomicReferenceArray buffer, int offset, Object value) static voidspLongElement(AtomicLongArray buffer, int offset, long e) static <E> voidspRefElement(AtomicReferenceArray<E> buffer, int offset, E value) static <E> voidsvRefElement(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
-