public final class JdkInternals extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
JdkInternals.Warning |
| Modifier and Type | Method and Description |
|---|---|
static long |
alignAddress(long address) |
static long |
allocateMemory(long bytes) |
static byte[] |
asByteArray(long value) |
static byte[] |
asByteArray(long[] longArray) |
static long |
byteSizeArray_boolean(long elementCount) |
static long |
byteSizeArray_byte(long elementCount) |
static long |
byteSizeArray_char(long elementCount) |
static long |
byteSizeArray_double(long elementCount) |
static long |
byteSizeArray_float(long elementCount) |
static long |
byteSizeArray_int(long elementCount) |
static long |
byteSizeArray_long(long elementCount) |
static long |
byteSizeArray_short(long elementCount) |
static long |
byteSizeArrayObject(long elementCount) |
static int |
byteSizeFieldValue(Class<?> type) |
static int |
byteSizeInstance(Class<?> type) |
static int |
byteSizeObjectHeader() |
static int |
byteSizeReference() |
static boolean |
compareAndSwap_int(Object subject,
long offset,
int expected,
int replacement) |
static boolean |
compareAndSwap_long(Object subject,
long offset,
long expected,
long replacement) |
static boolean |
compareAndSwapObject(Object subject,
long offset,
Object expected,
Object replacement) |
static void |
copyArrayToAddress(boolean[] array,
long targetAddress) |
static void |
copyArrayToAddress(byte[] array,
long targetAddress) |
static void |
copyArrayToAddress(char[] array,
long targetAddress) |
static void |
copyArrayToAddress(double[] array,
long targetAddress) |
static void |
copyArrayToAddress(float[] array,
long targetAddress) |
static void |
copyArrayToAddress(int[] array,
long targetAddress) |
static void |
copyArrayToAddress(long[] array,
long targetAddress) |
static void |
copyArrayToAddress(short[] array,
long targetAddress) |
static void |
copyRange(long sourceAddress,
long targetAddress,
long length) |
static void |
copyRange(Object source,
long sourceOffset,
Object target,
long targetOffset,
long length) |
static void |
copyRangeToArray(long sourceAddress,
boolean[] target) |
static void |
copyRangeToArray(long sourceAddress,
byte[] target) |
static void |
copyRangeToArray(long sourceAddress,
char[] target) |
static void |
copyRangeToArray(long sourceAddress,
double[] target) |
static void |
copyRangeToArray(long sourceAddress,
float[] target) |
static void |
copyRangeToArray(long sourceAddress,
int[] target) |
static void |
copyRangeToArray(long sourceAddress,
long[] target) |
static void |
copyRangeToArray(long sourceAddress,
short[] target) |
static MemoryStatistics |
createHeapMemoryStatistics() |
static MemoryStatistics |
createNonHeapMemoryStatistics() |
static boolean |
deallocateDirectBuffer(ByteBuffer directBuffer) |
static DirectBufferDeallocator |
DirectBufferDeallocator() |
static void |
ensureClassInitialized(Class<?>... classes) |
static void |
ensureClassInitialized(Class<?> c) |
static void |
fillMemory(long address,
long length,
byte value) |
static void |
freeMemory(long address) |
static boolean |
get_boolean(long address) |
static boolean |
get_boolean(Object instance,
long offset) |
static byte |
get_byte(long address) |
static byte |
get_byte(Object instance,
long offset) |
static char |
get_char(long address) |
static char |
get_char(Object instance,
long offset) |
static double |
get_double(long address) |
static double |
get_double(Object instance,
long offset) |
static float |
get_float(long address) |
static float |
get_float(Object instance,
long offset) |
static int |
get_int(long address) |
static int |
get_int(Object instance,
long offset) |
static long |
get_long(long address) |
static long |
get_long(Object instance,
long offset) |
static short |
get_short(long address) |
static short |
get_short(Object instance,
long offset) |
static DirectBufferAddressGetter |
getDirectBufferAddressGetter() |
static DirectBufferDeallocator |
getDirectBufferDeallocator() |
static long |
getDirectByteBufferAddress(ByteBuffer directBuffer) |
static sun.misc.Unsafe |
getMemoryAccess() |
static Object |
getObject(Object instance,
long offset) |
static Object |
getStaticFieldBase(Field field) |
static long[] |
getStaticFieldOffsets(Field[] fields) |
static void |
guaranteeUsability()
Guarantees the full usability of this class by validating if all functionality is usable.
|
static List<JdkInternals.Warning> |
initializationWarnings() |
static <T> T |
instantiateBlank(Class<T> c) |
static DefaultInstantiator |
InstantiatorBlank() |
static boolean |
internalDeallocateDirectBuffer(ByteBuffer directBuffer) |
static long |
internalGetDirectByteBufferAddress(ByteBuffer directBuffer) |
static long |
objectFieldOffset(Field field)
Return the field value's arithmetic memory offset relative to the object base offset.
|
static long[] |
objectFieldOffsets(Field... fields)
Array alias vor #objectFieldOffset(Field).
|
static int |
pageSize() |
static void |
printInitializationWarnings(PrintStream printStream) |
static long |
reallocateMemory(long address,
long bytes) |
static void |
set_boolean(long address,
boolean value) |
static void |
set_boolean(Object instance,
long offset,
boolean value) |
static void |
set_booleanInBytes(byte[] bytes,
int index,
boolean value) |
static void |
set_byte(long address,
byte value) |
static void |
set_byte(Object instance,
long offset,
byte value) |
static void |
set_byteInBytes(byte[] bytes,
int index,
byte value) |
static void |
set_char(long address,
char value) |
static void |
set_char(Object instance,
long offset,
char value) |
static void |
set_charInBytes(byte[] bytes,
int index,
char value) |
static void |
set_double(long address,
double value) |
static void |
set_double(Object instance,
long offset,
double value) |
static void |
set_doubleInBytes(byte[] bytes,
int index,
double value) |
static void |
set_float(long address,
float value) |
static void |
set_float(Object instance,
long offset,
float value) |
static void |
set_floatInBytes(byte[] bytes,
int index,
float value) |
static void |
set_int(long address,
int value) |
static void |
set_int(Object instance,
long offset,
int value) |
static void |
set_intInBytes(byte[] bytes,
int index,
int value) |
static void |
set_long(long address,
long value) |
static void |
set_long(Object instance,
long offset,
long value) |
static void |
set_longInBytes(byte[] bytes,
int index,
long value) |
static void |
set_short(long address,
short value) |
static void |
set_short(Object instance,
long offset,
short value) |
static void |
set_shortInBytes(byte[] bytes,
int index,
short value) |
static void |
setDirectBufferAddressGetter(DirectBufferAddressGetter addressGetter)
Allows to set the
DirectBufferAddressGetter used by
getDirectByteBufferAddress(ByteBuffer) as an override to the means this class inherently tries to provide.See DirectBufferAddressGetter for details. |
static void |
setDirectBufferDeallocator(DirectBufferDeallocator deallocator)
Allows to set the
DirectBufferDeallocator used by
deallocateDirectBuffer(ByteBuffer) as an override to the means this class inherently tries to provide.See DirectBufferDeallocator for details. |
static void |
setObject(Object instance,
long offset,
Object value) |
static void |
throwUnchecked(Throwable t) |
static sun.misc.Unsafe |
VM() |
public static sun.misc.Unsafe VM()
public static final sun.misc.Unsafe getMemoryAccess()
public static void guaranteeUsability()
Error - if not all functionality is usablepublic static final List<JdkInternals.Warning> initializationWarnings()
public static final void printInitializationWarnings(PrintStream printStream)
public static void setDirectBufferDeallocator(DirectBufferDeallocator deallocator)
DirectBufferDeallocator used by
deallocateDirectBuffer(ByteBuffer) as an override to the means this class inherently tries to provide.DirectBufferDeallocator for details.
The passed instance "should" be immutable or better stateless to ensure concurrency-safe usage, but ultimately, the responsibility resides with the author of the instance's implementation.
Passing a null resets the behavior of deallocateDirectBuffer(ByteBuffer) to the inherent logic.
deallocator - the deallocator to be used, potentially null.DirectBufferDeallocatorpublic static DirectBufferDeallocator getDirectBufferDeallocator()
public static void setDirectBufferAddressGetter(DirectBufferAddressGetter addressGetter)
DirectBufferAddressGetter used by
getDirectByteBufferAddress(ByteBuffer) as an override to the means this class inherently tries to provide.DirectBufferAddressGetter for details.
The passed instance "should" be immutable or better stateless to ensure concurrency-safe usage, but ultimately, the responsibility resides with the author of the instance's implementation.
Passing a null resets the behavior of getDirectByteBufferAddress(ByteBuffer) to the inherent logic.
addressGetter - the addressGetter to be used, potentially null.DirectBufferDeallocatorpublic static DirectBufferAddressGetter getDirectBufferAddressGetter()
public static final long internalGetDirectByteBufferAddress(ByteBuffer directBuffer)
public static final long getDirectByteBufferAddress(ByteBuffer directBuffer)
public static final boolean internalDeallocateDirectBuffer(ByteBuffer directBuffer)
public static final boolean deallocateDirectBuffer(ByteBuffer directBuffer)
public static final long allocateMemory(long bytes)
public static final long reallocateMemory(long address,
long bytes)
public static final void freeMemory(long address)
public static final void fillMemory(long address,
long length,
byte value)
public static final byte get_byte(long address)
public static final boolean get_boolean(long address)
public static final short get_short(long address)
public static final char get_char(long address)
public static final int get_int(long address)
public static final float get_float(long address)
public static final long get_long(long address)
public static final double get_double(long address)
public static byte get_byte(Object instance, long offset)
public static boolean get_boolean(Object instance, long offset)
public static short get_short(Object instance, long offset)
public static char get_char(Object instance, long offset)
public static int get_int(Object instance, long offset)
public static float get_float(Object instance, long offset)
public static long get_long(Object instance, long offset)
public static double get_double(Object instance, long offset)
public static void set_byte(long address,
byte value)
public static void set_boolean(long address,
boolean value)
public static void set_short(long address,
short value)
public static void set_char(long address,
char value)
public static void set_int(long address,
int value)
public static void set_float(long address,
float value)
public static void set_long(long address,
long value)
public static void set_double(long address,
double value)
public static final void set_byte(Object instance, long offset, byte value)
public static final void set_boolean(Object instance, long offset, boolean value)
public static void set_short(Object instance, long offset, short value)
public static final void set_char(Object instance, long offset, char value)
public static final void set_int(Object instance, long offset, int value)
public static final void set_float(Object instance, long offset, float value)
public static final void set_long(Object instance, long offset, long value)
public static final void set_double(Object instance, long offset, double value)
public static final void set_byteInBytes(byte[] bytes,
int index,
byte value)
public static final void set_booleanInBytes(byte[] bytes,
int index,
boolean value)
public static final void set_shortInBytes(byte[] bytes,
int index,
short value)
public static final void set_charInBytes(byte[] bytes,
int index,
char value)
public static final void set_intInBytes(byte[] bytes,
int index,
int value)
public static final void set_floatInBytes(byte[] bytes,
int index,
float value)
public static final void set_longInBytes(byte[] bytes,
int index,
long value)
public static final void set_doubleInBytes(byte[] bytes,
int index,
double value)
public static final void copyRange(long sourceAddress,
long targetAddress,
long length)
public static final void copyRange(Object source, long sourceOffset, Object target, long targetOffset, long length)
public static final void copyRangeToArray(long sourceAddress,
byte[] target)
public static final void copyRangeToArray(long sourceAddress,
boolean[] target)
public static final void copyRangeToArray(long sourceAddress,
short[] target)
public static final void copyRangeToArray(long sourceAddress,
char[] target)
public static final void copyRangeToArray(long sourceAddress,
int[] target)
public static final void copyRangeToArray(long sourceAddress,
float[] target)
public static final void copyRangeToArray(long sourceAddress,
long[] target)
public static final void copyRangeToArray(long sourceAddress,
double[] target)
public static final void copyArrayToAddress(byte[] array,
long targetAddress)
public static final void copyArrayToAddress(boolean[] array,
long targetAddress)
public static final void copyArrayToAddress(short[] array,
long targetAddress)
public static final void copyArrayToAddress(char[] array,
long targetAddress)
public static final void copyArrayToAddress(int[] array,
long targetAddress)
public static final void copyArrayToAddress(float[] array,
long targetAddress)
public static final void copyArrayToAddress(long[] array,
long targetAddress)
public static final void copyArrayToAddress(double[] array,
long targetAddress)
public static final byte[] asByteArray(long[] longArray)
public static final byte[] asByteArray(long value)
public static final long objectFieldOffset(Field field)
field - the field to get the offset forpublic static final long[] objectFieldOffsets(Field... fields)
fields - the fields to get the offset forpublic static final void ensureClassInitialized(Class<?> c)
public static final void ensureClassInitialized(Class<?>... classes)
public static final <T> T instantiateBlank(Class<T> c) throws InstantiationRuntimeException
InstantiationRuntimeExceptionpublic static final DefaultInstantiator InstantiatorBlank()
public static final DirectBufferDeallocator DirectBufferDeallocator()
public static int pageSize()
public static final int byteSizeReference()
public static int byteSizeInstance(Class<?> type)
public static final int byteSizeObjectHeader()
public static final int byteSizeFieldValue(Class<?> type)
public static final long byteSizeArray_byte(long elementCount)
public static final long byteSizeArray_boolean(long elementCount)
public static final long byteSizeArray_short(long elementCount)
public static final long byteSizeArray_char(long elementCount)
public static final long byteSizeArray_int(long elementCount)
public static final long byteSizeArray_float(long elementCount)
public static final long byteSizeArray_long(long elementCount)
public static final long byteSizeArray_double(long elementCount)
public static final long byteSizeArrayObject(long elementCount)
public static final void throwUnchecked(Throwable t)
public static final boolean compareAndSwap_int(Object subject, long offset, int expected, int replacement)
public static final boolean compareAndSwap_long(Object subject, long offset, long expected, long replacement)
public static final boolean compareAndSwapObject(Object subject, long offset, Object expected, Object replacement)
public static final long alignAddress(long address)
public static long[] getStaticFieldOffsets(Field[] fields)
public static MemoryStatistics createHeapMemoryStatistics()
public static MemoryStatistics createNonHeapMemoryStatistics()
Copyright © 2022 MicroStream Software. All rights reserved.