| Modifier and Type | Field and Description |
|---|---|
static UnsafeMemory |
INSTANCE |
static boolean |
tracing
Deprecated.
|
static @NotNull sun.misc.Unsafe |
UNSAFE |
| Constructor and Description |
|---|
UnsafeMemory() |
| Modifier and Type | Method and Description |
|---|---|
int |
addInt(long address,
int increment) |
int |
addInt(@NotNull Object object,
long offset,
int increment) |
long |
addLong(long address,
long increment) |
long |
addLong(@NotNull Object object,
long offset,
long increment) |
long |
allocate(long capacity) |
<E> E |
allocateInstance(Class<? extends E> clazz) |
boolean |
compareAndSwapInt(long address,
int expected,
int value) |
boolean |
compareAndSwapInt(@NotNull Object object,
long offset,
int expected,
int value) |
boolean |
compareAndSwapLong(long address,
long expected,
long value) |
boolean |
compareAndSwapLong(@NotNull Object object,
long offset,
long expected,
long value) |
void |
copyMemory(byte[] bytes,
int offset,
long address,
int length) |
void |
copyMemory(byte[] bytes,
int offset,
Object obj2,
long offset2,
int length) |
static void |
copyMemory(long from,
long to,
int length) |
void |
copyMemory(long fromAddress,
long address,
long length) |
void |
copyMemory(long fromAddress,
Object obj2,
long offset2,
int length) |
void |
freeMemory(long address,
long size) |
long |
getFieldOffset(Field field) |
<T> T |
getObject(@NotNull Object object,
long offset) |
void |
loadFence() |
long |
nativeMemoryUsed() |
int |
pageSize() |
static void |
putInt(byte[] bytes,
int offset,
int value) |
byte |
readByte(long address) |
byte |
readByte(@NotNull Object object,
long offset) |
void |
readBytes(long address,
byte[] b,
long offset,
int length) |
double |
readDouble(long address) |
double |
readDouble(@NotNull Object object,
long offset) |
float |
readFloat(long address) |
float |
readFloat(@NotNull Object object,
long offset) |
int |
readInt(long address) |
int |
readInt(@NotNull Object object,
long offset) |
long |
readLong(long address) |
long |
readLong(@NotNull Object object,
long offset) |
short |
readShort(long address) |
short |
readShort(@NotNull Object object,
long offset) |
byte |
readVolatileByte(long address) |
byte |
readVolatileByte(@NotNull Object object,
long offset) |
double |
readVolatileDouble(long address) |
double |
readVolatileDouble(@NotNull Object object,
long offset) |
float |
readVolatileFloat(long address) |
float |
readVolatileFloat(@NotNull Object object,
long offset) |
int |
readVolatileInt(long address) |
int |
readVolatileInt(@NotNull Object object,
long offset) |
long |
readVolatileLong(long address) |
long |
readVolatileLong(@NotNull Object object,
long offset) |
short |
readVolatileShort(long address) |
short |
readVolatileShort(@NotNull Object object,
long offset) |
void |
setInt(@NotNull Object object,
long offset,
int value) |
void |
setMemory(long address,
long size,
byte b) |
void |
storeFence() |
void |
testAndSetInt(long address,
long offset,
int expected,
int value) |
void |
testAndSetInt(@NotNull Object object,
long offset,
int expected,
int value) |
static boolean |
unsafeGetBoolean(@NotNull Object obj,
long offset) |
static byte |
unsafeGetByte(long address) |
static byte |
unsafeGetByte(@NotNull Object obj,
long offset) |
static char |
unsafeGetChar(@NotNull Object obj,
long offset) |
static double |
unsafeGetDouble(@NotNull Object obj,
long offset) |
static float |
unsafeGetFloat(@NotNull Object obj,
long offset) |
static int |
unsafeGetInt(long address) |
static int |
unsafeGetInt(@NotNull Object obj,
long offset) |
static long |
unsafeGetLong(long address) |
static long |
unsafeGetLong(@NotNull Object obj,
long offset) |
static <T> T |
unsafeGetObject(@NotNull Object obj,
long offset) |
static short |
unsafeGetShort(@NotNull Object obj,
long offset) |
static void |
unsafeLoadFence() |
static long |
unsafeObjectFieldOffset(Field field) |
static void |
unsafePutBoolean(@NotNull Object obj,
long offset,
boolean value) |
static void |
unsafePutByte(byte[] bytes,
int offset,
byte value) |
static void |
unsafePutByte(long address,
byte value) |
static void |
unsafePutByte(@NotNull Object obj,
long offset,
byte value) |
static void |
unsafePutChar(@NotNull Object obj,
long offset,
char value) |
static void |
unsafePutDouble(@NotNull Object obj,
long offset,
double value) |
static void |
unsafePutFloat(@NotNull Object obj,
long offset,
float value) |
static void |
unsafePutInt(byte[] bytes,
int offset,
int value) |
static void |
unsafePutInt(long address,
int value) |
static void |
unsafePutInt(@NotNull Object obj,
long offset,
int value) |
static void |
unsafePutLong(byte[] bytes,
int offset,
long value) |
static void |
unsafePutLong(long address,
long value) |
static void |
unsafePutLong(@NotNull Object obj,
long offset,
long value) |
static void |
unsafePutObject(@NotNull Object obj,
long offset,
Object value) |
static void |
unsafePutShort(@NotNull Object obj,
long offset,
short value) |
static void |
unsafeStoreFence() |
void |
writeByte(long address,
byte b) |
void |
writeByte(@NotNull Object object,
long offset,
byte b) |
void |
writeBytes(long address,
byte[] b,
int offset,
int length) |
void |
writeDouble(long address,
double d) |
void |
writeDouble(@NotNull Object object,
long offset,
double d) |
void |
writeFloat(long address,
float f) |
void |
writeFloat(@NotNull Object object,
long offset,
float f) |
void |
writeInt(long address,
int i32) |
void |
writeInt(@NotNull Object object,
long offset,
int i32) |
void |
writeLong(long address,
long i64) |
void |
writeLong(@NotNull Object object,
long offset,
long i64) |
void |
writeOrderedInt(long address,
int i32) |
void |
writeOrderedInt(@NotNull Object object,
long offset,
int i32) |
void |
writeOrderedLong(long address,
long i) |
void |
writeOrderedLong(@NotNull Object object,
long offset,
long i) |
void |
writeShort(long address,
short i16) |
void |
writeShort(@NotNull Object object,
long offset,
short i16) |
void |
writeVolatileByte(long address,
byte b) |
void |
writeVolatileByte(@NotNull Object object,
long offset,
byte b) |
void |
writeVolatileDouble(long address,
double d) |
void |
writeVolatileDouble(@NotNull Object object,
long offset,
double d) |
void |
writeVolatileFloat(long address,
float f) |
void |
writeVolatileFloat(@NotNull Object object,
long offset,
float f) |
void |
writeVolatileInt(long address,
int i32) |
void |
writeVolatileInt(@NotNull Object object,
long offset,
int i32) |
void |
writeVolatileLong(long address,
long i64) |
void |
writeVolatileLong(@NotNull Object object,
long offset,
long i64) |
void |
writeVolatileShort(long address,
short i16) |
void |
writeVolatileShort(@NotNull Object object,
long offset,
short i16) |
@NotNull public static final @NotNull sun.misc.Unsafe UNSAFE
public static final UnsafeMemory INSTANCE
@Deprecated public static final boolean tracing
public static void putInt(byte[] bytes,
int offset,
int value)
public static void unsafeStoreFence()
public static void unsafeLoadFence()
public static long unsafeGetLong(long address)
public static int unsafeGetInt(long address)
public static byte unsafeGetByte(long address)
public static void unsafePutLong(long address,
long value)
public static void unsafePutInt(long address,
int value)
public static void unsafePutByte(long address,
byte value)
public static void unsafePutLong(byte[] bytes,
int offset,
long value)
public static void unsafePutInt(byte[] bytes,
int offset,
int value)
public static void unsafePutByte(byte[] bytes,
int offset,
byte value)
public static void copyMemory(long from,
long to,
int length)
throws BufferUnderflowException,
BufferOverflowException
public static void unsafePutBoolean(@NotNull
@NotNull Object obj,
long offset,
boolean value)
public static boolean unsafeGetBoolean(@NotNull
@NotNull Object obj,
long offset)
public static void unsafePutByte(@NotNull
@NotNull Object obj,
long offset,
byte value)
public static byte unsafeGetByte(@NotNull
@NotNull Object obj,
long offset)
public static void unsafePutChar(@NotNull
@NotNull Object obj,
long offset,
char value)
public static char unsafeGetChar(@NotNull
@NotNull Object obj,
long offset)
public static void unsafePutShort(@NotNull
@NotNull Object obj,
long offset,
short value)
public static short unsafeGetShort(@NotNull
@NotNull Object obj,
long offset)
public static void unsafePutInt(@NotNull
@NotNull Object obj,
long offset,
int value)
public static int unsafeGetInt(@NotNull
@NotNull Object obj,
long offset)
public static void unsafePutFloat(@NotNull
@NotNull Object obj,
long offset,
float value)
public static float unsafeGetFloat(@NotNull
@NotNull Object obj,
long offset)
public static void unsafePutLong(@NotNull
@NotNull Object obj,
long offset,
long value)
public static long unsafeGetLong(@NotNull
@NotNull Object obj,
long offset)
public static void unsafePutDouble(@NotNull
@NotNull Object obj,
long offset,
double value)
public static double unsafeGetDouble(@NotNull
@NotNull Object obj,
long offset)
public static void unsafePutObject(@NotNull
@NotNull Object obj,
long offset,
Object value)
public static <T> T unsafeGetObject(@NotNull
@NotNull Object obj,
long offset)
public static long unsafeObjectFieldOffset(Field field)
@NotNull public <E> E allocateInstance(Class<? extends E> clazz) throws InstantiationException
allocateInstance in interface MemoryInstantiationExceptionpublic long getFieldOffset(Field field)
getFieldOffset in interface Memorypublic void setInt(@NotNull
@NotNull Object object,
long offset,
int value)
@NotNull
public <T> T getObject(@NotNull
@NotNull Object object,
long offset)
public void storeFence()
storeFence in interface Memorypublic void setMemory(long address,
long size,
byte b)
public void freeMemory(long address,
long size)
freeMemory in interface Memorypublic long allocate(long capacity)
throws IllegalArgumentException
allocate in interface MemoryIllegalArgumentExceptionpublic long nativeMemoryUsed()
nativeMemoryUsed in interface Memorypublic void writeByte(@NotNull
@NotNull Object object,
long offset,
byte b)
public byte readByte(@NotNull
@NotNull Object object,
long offset)
public void writeBytes(long address,
byte[] b,
int offset,
int length)
writeBytes in interface Memorypublic void readBytes(long address,
byte[] b,
long offset,
int length)
public void writeShort(long address,
short i16)
writeShort in interface Memorypublic void writeShort(@NotNull
@NotNull Object object,
long offset,
short i16)
writeShort in interface Memorypublic short readShort(@NotNull
@NotNull Object object,
long offset)
public void writeInt(@NotNull
@NotNull Object object,
long offset,
int i32)
public void writeOrderedInt(long address,
int i32)
writeOrderedInt in interface Memorypublic void writeOrderedInt(@NotNull
@NotNull Object object,
long offset,
int i32)
writeOrderedInt in interface Memorypublic int readInt(@NotNull
@NotNull Object object,
long offset)
public void writeLong(@NotNull
@NotNull Object object,
long offset,
long i64)
public long readLong(@NotNull
@NotNull Object object,
long offset)
public void writeFloat(long address,
float f)
writeFloat in interface Memorypublic void writeFloat(@NotNull
@NotNull Object object,
long offset,
float f)
writeFloat in interface Memorypublic float readFloat(@NotNull
@NotNull Object object,
long offset)
public void writeDouble(long address,
double d)
writeDouble in interface Memorypublic void writeDouble(@NotNull
@NotNull Object object,
long offset,
double d)
writeDouble in interface Memorypublic double readDouble(long address)
readDouble in interface Memorypublic double readDouble(@NotNull
@NotNull Object object,
long offset)
readDouble in interface Memorypublic void copyMemory(byte[] bytes,
int offset,
long address,
int length)
copyMemory in interface Memorypublic void copyMemory(long fromAddress,
long address,
long length)
copyMemory in interface Memorypublic void copyMemory(byte[] bytes,
int offset,
Object obj2,
long offset2,
int length)
copyMemory in interface Memorypublic void copyMemory(long fromAddress,
Object obj2,
long offset2,
int length)
copyMemory in interface Memorypublic void writeOrderedLong(long address,
long i)
writeOrderedLong in interface Memorypublic void writeOrderedLong(@NotNull
@NotNull Object object,
long offset,
long i)
writeOrderedLong in interface Memorypublic void testAndSetInt(long address,
long offset,
int expected,
int value)
throws IllegalStateException
testAndSetInt in interface MemoryIllegalStateExceptionpublic void testAndSetInt(@NotNull
@NotNull Object object,
long offset,
int expected,
int value)
throws IllegalStateException
testAndSetInt in interface MemoryIllegalStateExceptionpublic boolean compareAndSwapInt(long address,
int expected,
int value)
compareAndSwapInt in interface Memorypublic boolean compareAndSwapInt(@NotNull
@NotNull Object object,
long offset,
int expected,
int value)
compareAndSwapInt in interface Memorypublic boolean compareAndSwapLong(long address,
long expected,
long value)
compareAndSwapLong in interface Memorypublic boolean compareAndSwapLong(@NotNull
@NotNull Object object,
long offset,
long expected,
long value)
compareAndSwapLong in interface Memorypublic byte readVolatileByte(long address)
readVolatileByte in interface Memorypublic byte readVolatileByte(@NotNull
@NotNull Object object,
long offset)
readVolatileByte in interface Memorypublic short readVolatileShort(long address)
readVolatileShort in interface Memorypublic short readVolatileShort(@NotNull
@NotNull Object object,
long offset)
readVolatileShort in interface Memorypublic int readVolatileInt(long address)
readVolatileInt in interface Memorypublic int readVolatileInt(@NotNull
@NotNull Object object,
long offset)
readVolatileInt in interface Memorypublic float readVolatileFloat(long address)
readVolatileFloat in interface Memorypublic float readVolatileFloat(@NotNull
@NotNull Object object,
long offset)
readVolatileFloat in interface Memorypublic long readVolatileLong(long address)
readVolatileLong in interface Memorypublic long readVolatileLong(@NotNull
@NotNull Object object,
long offset)
readVolatileLong in interface Memorypublic double readVolatileDouble(long address)
readVolatileDouble in interface Memorypublic double readVolatileDouble(@NotNull
@NotNull Object object,
long offset)
readVolatileDouble in interface Memorypublic void writeVolatileByte(long address,
byte b)
writeVolatileByte in interface Memorypublic void writeVolatileByte(@NotNull
@NotNull Object object,
long offset,
byte b)
writeVolatileByte in interface Memorypublic void writeVolatileShort(long address,
short i16)
writeVolatileShort in interface Memorypublic void writeVolatileShort(@NotNull
@NotNull Object object,
long offset,
short i16)
writeVolatileShort in interface Memorypublic void writeVolatileInt(long address,
int i32)
writeVolatileInt in interface Memorypublic void writeVolatileInt(@NotNull
@NotNull Object object,
long offset,
int i32)
writeVolatileInt in interface Memorypublic void writeVolatileFloat(long address,
float f)
writeVolatileFloat in interface Memorypublic void writeVolatileFloat(@NotNull
@NotNull Object object,
long offset,
float f)
writeVolatileFloat in interface Memorypublic void writeVolatileLong(long address,
long i64)
writeVolatileLong in interface Memorypublic void writeVolatileLong(@NotNull
@NotNull Object object,
long offset,
long i64)
writeVolatileLong in interface Memorypublic void writeVolatileDouble(long address,
double d)
writeVolatileDouble in interface Memorypublic void writeVolatileDouble(@NotNull
@NotNull Object object,
long offset,
double d)
writeVolatileDouble in interface Memorypublic int addInt(@NotNull
@NotNull Object object,
long offset,
int increment)
Copyright © 2020. All rights reserved.