public final class AtomicQueueUtil extends Object
| Constructor and Description |
|---|
AtomicQueueUtil() |
| Modifier and Type | Method and Description |
|---|---|
static 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 << 1) because lower bit is used for resize hence the >> 1
|
static 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) |
public static <E> E lvRefElement(AtomicReferenceArray<E> buffer, int offset)
public static <E> E lpRefElement(AtomicReferenceArray<E> buffer, int offset)
public static <E> void spRefElement(AtomicReferenceArray<E> buffer, int offset, E value)
public static void soRefElement(AtomicReferenceArray buffer, int offset, Object value)
public static <E> void svRefElement(AtomicReferenceArray<E> buffer, int offset, E value)
public static int calcRefElementOffset(long index)
public static int calcCircularRefElementOffset(long index,
long mask)
public static <E> AtomicReferenceArray<E> allocateRefArray(int capacity)
public static void spLongElement(AtomicLongArray buffer, int offset, long e)
public static void soLongElement(AtomicLongArray buffer, int offset, long e)
public static long lpLongElement(AtomicLongArray buffer, int offset)
public static long lvLongElement(AtomicLongArray buffer, int offset)
public static int calcLongElementOffset(long index)
public static int calcCircularLongElementOffset(long index,
int mask)
public static AtomicLongArray allocateLongArray(int capacity)
public static int length(AtomicReferenceArray<?> buf)
public static int modifiedCalcCircularRefElementOffset(long index,
long mask)
public static int nextArrayOffset(AtomicReferenceArray<?> curr)
Copyright © 2013–2024. All rights reserved.