public class UnsafeAccess
extends java.lang.Object
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 |
---|---|
static boolean |
SUPPORTS_GET_AND_SET |
static sun.misc.Unsafe |
UNSAFE |
Constructor and Description |
---|
UnsafeAccess() |
Modifier and Type | Method and Description |
---|---|
static long |
fieldOffset(java.lang.Class clz,
java.lang.String fieldName) |