public interface HeapMemoryAccessor extends ByteAccessStrategy<Object>
Modifier and Type | Field and Description |
---|---|
static int |
ARRAY_BOOLEAN_BASE_OFFSET
Base offset of boolean[]
|
static int |
ARRAY_BOOLEAN_INDEX_SCALE
Index scale of boolean[]
|
static int |
ARRAY_BYTE_BASE_OFFSET
Base offset of byte[]
|
static int |
ARRAY_BYTE_INDEX_SCALE
Index scale of byte[]
|
static int |
ARRAY_CHAR_BASE_OFFSET
Base offset of char[]
|
static int |
ARRAY_CHAR_INDEX_SCALE
Index scale of char[]
|
static int |
ARRAY_DOUBLE_BASE_OFFSET
Base offset of double[]
|
static int |
ARRAY_DOUBLE_INDEX_SCALE
Index scale of double[]
|
static int |
ARRAY_FLOAT_BASE_OFFSET
Base offset of float[]
|
static int |
ARRAY_FLOAT_INDEX_SCALE
Index scale of float[]
|
static int |
ARRAY_INT_BASE_OFFSET
Base offset of int[]
|
static int |
ARRAY_INT_INDEX_SCALE
Index scale of int[]
|
static int |
ARRAY_LONG_BASE_OFFSET
Base offset of long[]
|
static int |
ARRAY_LONG_INDEX_SCALE
Index scale of long[]
|
static int |
ARRAY_OBJECT_BASE_OFFSET
Base offset of any type of Object[]
|
static int |
ARRAY_OBJECT_INDEX_SCALE
Index scale of any type of Object[]
|
static int |
ARRAY_SHORT_BASE_OFFSET
Base offset of short[]
|
static int |
ARRAY_SHORT_INDEX_SCALE
Index scale of short[]
|
Modifier and Type | Method and Description |
---|---|
int |
arrayBaseOffset(Class<?> arrayClass)
Gets the base offset of the array typed with given class.
|
int |
arrayIndexScale(Class<?> arrayClass)
Gets the index scale of the array typed with given class.
|
void |
copyMemory(Object srcObj,
long srcOffset,
Object destObj,
long destOffset,
long lengthBytes)
Copies memory from source to destination.
|
boolean |
getBoolean(Object base,
long offset)
Returns the boolean value at the supplied offset from the supplied object's base address.
|
byte |
getByte(Object base,
long offset)
Returns the byte value at the supplied offset from the supplied object's base address.
|
char |
getChar(Object base,
long offset)
Returns the char value at the supplied offset from the supplied object's base address.
|
double |
getDouble(Object base,
long offset)
Returns the double value at the supplied offset from the supplied object's base address.
|
float |
getFloat(Object base,
long offset)
Returns the float value at the supplied offset from the supplied object's base address.
|
int |
getInt(Object base,
long offset)
Returns the int value at the supplied offset from the supplied object's base address.
|
long |
getLong(Object base,
long offset)
Returns the long value at the supplied offset from the supplied object's base address.
|
Object |
getObject(Object base,
long offset)
Returns the object reference at the supplied offset from the supplied object's base address.
|
short |
getShort(Object base,
long offset)
Returns the short value at the supplied offset from the supplied object's base address.
|
long |
objectFieldOffset(Field field)
Gets the offset of given field.
|
void |
putBoolean(Object base,
long offset,
boolean x)
Puts the supplied boolean value at the supplied offset from the supplied object's base address.
|
void |
putByte(Object base,
long offset,
byte x)
Puts the supplied byte value at the supplied offset from the supplied object's base address.
|
void |
putChar(Object base,
long offset,
char x)
Puts the supplied char value at the supplied offset from the supplied object's base address.
|
void |
putDouble(Object base,
long offset,
double x)
Puts the supplied double value at the supplied offset from the supplied object's base address.
|
void |
putFloat(Object base,
long offset,
float x)
Puts the supplied float value at the supplied offset from the supplied object's base address.
|
void |
putInt(Object base,
long offset,
int x)
Puts the supplied int value at the supplied offset from the supplied object's base address.
|
void |
putLong(Object base,
long offset,
long x)
Puts the supplied long value at the supplied offset from the supplied object's base address.
|
void |
putObject(Object base,
long offset,
Object x)
Puts the supplied object reference at the supplied offset from the supplied object's base address.
|
void |
putShort(Object base,
long offset,
short x)
Puts the supplied short value at the supplied offset from the supplied object's base address.
|
static final int ARRAY_BOOLEAN_BASE_OFFSET
static final int ARRAY_BYTE_BASE_OFFSET
static final int ARRAY_SHORT_BASE_OFFSET
static final int ARRAY_CHAR_BASE_OFFSET
static final int ARRAY_INT_BASE_OFFSET
static final int ARRAY_FLOAT_BASE_OFFSET
static final int ARRAY_LONG_BASE_OFFSET
static final int ARRAY_DOUBLE_BASE_OFFSET
static final int ARRAY_OBJECT_BASE_OFFSET
static final int ARRAY_BOOLEAN_INDEX_SCALE
static final int ARRAY_BYTE_INDEX_SCALE
static final int ARRAY_SHORT_INDEX_SCALE
static final int ARRAY_CHAR_INDEX_SCALE
static final int ARRAY_INT_INDEX_SCALE
static final int ARRAY_FLOAT_INDEX_SCALE
static final int ARRAY_LONG_INDEX_SCALE
static final int ARRAY_DOUBLE_INDEX_SCALE
static final int ARRAY_OBJECT_INDEX_SCALE
long objectFieldOffset(Field field)
field
- the field whose offset is requestedint arrayBaseOffset(Class<?> arrayClass)
arrayClass
- the type of the array whose base offset is requestedint arrayIndexScale(Class<?> arrayClass)
arrayClass
- the type of the array whose index scale is requestedvoid copyMemory(Object srcObj, long srcOffset, Object destObj, long destOffset, long lengthBytes)
(baseObject, offset)
such that the offset is added to the object's base
address on Java heap.srcObj
- source objectsrcOffset
- source offsetdestObj
- destination objectdestOffset
- destination offsetlengthBytes
- number of bytes to be copiedObject getObject(Object base, long offset)
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putObject(Object base, long offset, Object x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtenboolean getBoolean(Object base, long offset)
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putBoolean(Object base, long offset, boolean x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtenbyte getByte(Object base, long offset)
getByte
in interface ByteAccessStrategy<Object>
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putByte(Object base, long offset, byte x)
putByte
in interface ByteAccessStrategy<Object>
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtenchar getChar(Object base, long offset)
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putChar(Object base, long offset, char x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtenshort getShort(Object base, long offset)
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putShort(Object base, long offset, short x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtenint getInt(Object base, long offset)
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putInt(Object base, long offset, int x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtenfloat getFloat(Object base, long offset)
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putFloat(Object base, long offset, float x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtenlong getLong(Object base, long offset)
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putLong(Object base, long offset, long x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtendouble getDouble(Object base, long offset)
base
- the object whose base address to use for the operationoffset
- offset from object's base to the accessed locationvoid putDouble(Object base, long offset, double x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationx
- the referenced object to be writtenCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.