Package org.jctools.queues.varhandle
Class VarHandleQueueUtil
- java.lang.Object
-
- org.jctools.queues.varhandle.VarHandleQueueUtil
-
public final class VarHandleQueueUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.invoke.VarHandleARRAY_LONG_ELEMENTprivate static java.lang.invoke.VarHandleARRAY_REF_ELEMENT
-
Constructor Summary
Constructors Constructor Description VarHandleQueueUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long[]allocateLongArray(int capacity)static <E> E[]allocateRefArray(int capacity)static longcalcCircularLongElementOffset(long index, long mask)static longcalcCircularRefElementOffset(long index, long mask)static longcalcRefElementOffset(long index)static longlaLongElement(long[] buffer, long offset)static <E> ElaRefElement(E[] buffer, long offset)static intlength(java.lang.Object[] buf)static longlpLongElement(long[] buffer, long offset)static <E> ElpRefElement(E[] buffer, long offset)static longlvLongElement(long[] buffer, long offset)static <E> ElvRefElement(E[] buffer, long offset)static longmodifiedCalcCircularRefElementOffset(long index, long mask)This method assumes index is actually (index << 1) because lower bit is used for resize hence the >> 1static longnextArrayOffset(java.lang.Object[] curr)static voidsoLongElement(long[] buffer, long offset, long e)static <E> voidsoRefElement(E[] buffer, long offset, E value)static voidspLongElement(long[] buffer, long offset, long e)static <E> voidspRefElement(E[] buffer, long offset, E value)static <E> voidsvRefElement(E[] buffer, long offset, E value)
-
-
-
Method Detail
-
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(java.lang.Object[] buf)
-
modifiedCalcCircularRefElementOffset
public static long modifiedCalcCircularRefElementOffset(long index, long mask)This method assumes index is actually (index << 1) because lower bit is used for resize hence the >> 1
-
nextArrayOffset
public static long nextArrayOffset(java.lang.Object[] curr)
-
-