AtomicReferenceFieldUpdater
and similar but their performance is arguably worse than the DIY approach
(depending on JVM version) while Unsafe intrinsification is a far lesser challenge for JIT compilers.
AtomicReferenceArray
.
Modifier and Type | Field and Description |
---|---|
public static final boolean | |
public static final boolean | |
public static final Unsafe |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public static long | |
private static Unsafe | |
private static boolean | |
private static boolean |
SUPPORTS_GET_AND_ADD_LONG | back to summary |
---|---|
public static final boolean SUPPORTS_GET_AND_ADD_LONG |
SUPPORTS_GET_AND_SET_REF | back to summary |
---|---|
public static final boolean SUPPORTS_GET_AND_SET_REF |
UNSAFE | back to summary |
---|---|
public static final Unsafe UNSAFE |
UnsafeAccess | back to summary |
---|---|
public UnsafeAccess() |
fieldOffset | back to summary |
---|---|
public static long fieldOffset(Class<T> clz, String fieldName) throws RuntimeException |
getUnsafe | back to summary |
---|---|
private static Unsafe getUnsafe() |
hasGetAndAddLongSupport | back to summary |
---|---|
private static boolean hasGetAndAddLongSupport() |
hasGetAndSetSupport | back to summary |
---|---|
private static boolean hasGetAndSetSupport() |