public interface ConcurrentHeapMemoryAccessor extends HeapMemoryAccessor
HeapMemoryAccessor
with concurrent operations.ARRAY_BOOLEAN_BASE_OFFSET, ARRAY_BOOLEAN_INDEX_SCALE, ARRAY_BYTE_BASE_OFFSET, ARRAY_BYTE_INDEX_SCALE, ARRAY_CHAR_BASE_OFFSET, ARRAY_CHAR_INDEX_SCALE, ARRAY_DOUBLE_BASE_OFFSET, ARRAY_DOUBLE_INDEX_SCALE, ARRAY_FLOAT_BASE_OFFSET, ARRAY_FLOAT_INDEX_SCALE, ARRAY_INT_BASE_OFFSET, ARRAY_INT_INDEX_SCALE, ARRAY_LONG_BASE_OFFSET, ARRAY_LONG_INDEX_SCALE, ARRAY_OBJECT_BASE_OFFSET, ARRAY_OBJECT_INDEX_SCALE, ARRAY_SHORT_BASE_OFFSET, ARRAY_SHORT_INDEX_SCALE
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSwapInt(Object base,
long offset,
int expected,
int x)
Compares and swaps an int value to an expected value atomically
based by given object with given offset,
if and only if its current value is equal to the expected value.
|
boolean |
compareAndSwapLong(Object base,
long offset,
long expected,
long x)
Compares and swaps a long value to an expected value atomically
based by given object with given offset
if and only if its current value equals to the expected value.
|
boolean |
compareAndSwapObject(Object base,
long offset,
Object expected,
Object x)
Compares and swaps referenced object to expected object atomically
based by given owner object at given offset
if and only if its current object is the expected object.
|
boolean |
getBooleanVolatile(Object base,
long offset)
Reads the boolean value as volatile from given object by its offset.
|
byte |
getByteVolatile(Object base,
long offset)
Reads the byte value as volatile from given object by its offset.
|
char |
getCharVolatile(Object base,
long offset)
Reads the char value as volatile from given object by its offset.
|
double |
getDoubleVolatile(Object base,
long offset)
Reads the double value as volatile from given object by its offset.
|
float |
getFloatVolatile(Object base,
long offset)
Reads the float value as volatile from given object by its offset.
|
int |
getIntVolatile(Object base,
long offset)
Reads the int value as volatile from given object by its offset.
|
long |
getLongVolatile(Object base,
long offset)
Reads the long value as volatile from given object by its offset.
|
Object |
getObjectVolatile(Object base,
long offset)
Gets the referenced object from given owner object as volatile by its offset.
|
short |
getShortVolatile(Object base,
long offset)
Reads the short value as volatile from given object by its offset.
|
void |
putBooleanVolatile(Object base,
long offset,
boolean x)
Writes the boolean value as volatile to given object by its offset.
|
void |
putByteVolatile(Object base,
long offset,
byte x)
Writes the byte value as volatile to given object by its offset.
|
void |
putCharVolatile(Object base,
long offset,
char x)
Writes the char value as volatile to given object by its offset.
|
void |
putDoubleVolatile(Object base,
long offset,
double x)
Writes the double value as volatile to given object by its offset.
|
void |
putFloatVolatile(Object base,
long offset,
float x)
Writes the float value as volatile to given object by its offset.
|
void |
putIntVolatile(Object base,
long offset,
int x)
Writes the int value as volatile to given object by its offset.
|
void |
putLongVolatile(Object base,
long offset,
long x)
Writes the long value as volatile to given object by its offset.
|
void |
putObjectVolatile(Object base,
long offset,
Object x)
Puts the referenced object to given owner object as volatile by its offset.
|
void |
putOrderedInt(Object base,
long offset,
int x)
Puts the given int value as ordered to the CPU write buffer
based by the given object at the given offset.
|
void |
putOrderedLong(Object base,
long offset,
long x)
Puts the given long value as ordered to the CPU write buffer
based by the given object at the given offset.
|
void |
putOrderedObject(Object base,
long offset,
Object x)
Puts the given referenced object as ordered to the CPU write buffer
based by the given owner object at the given offset.
|
void |
putShortVolatile(Object base,
long offset,
short x)
Writes the short value as volatile to given object by its offset.
|
arrayBaseOffset, arrayIndexScale, copyMemory, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getObject, getShort, objectFieldOffset, putBoolean, putByte, putChar, putDouble, putFloat, putInt, putLong, putObject, putShort
boolean getBooleanVolatile(Object base, long offset)
base
- the object where boolean value will be read fromoffset
- offset from object's base to the accessed locationvoid putBooleanVolatile(Object base, long offset, boolean x)
base
- the object where boolean value will be written tooffset
- offset from object's base to the accessed locationx
- the boolean value to be writtenbyte getByteVolatile(Object base, long offset)
base
- the object where the byte value will be read fromoffset
- offset from object's base to the accessed locationvoid putByteVolatile(Object base, long offset, byte x)
base
- the object where the byte value will be written tooffset
- offset from object's base to the accessed locationx
- the byte value to be writtenchar getCharVolatile(Object base, long offset)
base
- the object where char value will be read fromoffset
- offset from object's base to the accessed locationvoid putCharVolatile(Object base, long offset, char x)
base
- the object where char value will be written tooffset
- offset from object's base to the accessed locationx
- the char value to be writtenshort getShortVolatile(Object base, long offset)
base
- the object where short value will be read fromoffset
- offset from object's base to the accessed locationvoid putShortVolatile(Object base, long offset, short x)
base
- the object where short value will be written tooffset
- offset from object's base to the accessed locationx
- the short value to be writtenint getIntVolatile(Object base, long offset)
base
- the object where int value will be read fromoffset
- offset from object's base to the accessed locationvoid putIntVolatile(Object base, long offset, int x)
base
- the object where int value will be written tooffset
- offset from object's base to the accessed locationx
- the int value to be writtenfloat getFloatVolatile(Object base, long offset)
base
- the object where float value will be read fromoffset
- offset from object's base to the accessed locationvoid putFloatVolatile(Object base, long offset, float x)
base
- the object where float value will be written tooffset
- offset from object's base to the accessed locationx
- the float value to be writtenlong getLongVolatile(Object base, long offset)
base
- the object where long value will be read fromoffset
- offset from object's base to the accessed locationvoid putLongVolatile(Object base, long offset, long x)
base
- the object where long value will be written tooffset
- offset from object's base to the accessed locationx
- the long value to be writtendouble getDoubleVolatile(Object base, long offset)
base
- the object where double value will be read fromoffset
- offset from object's base to the accessed locationvoid putDoubleVolatile(Object base, long offset, double x)
base
- the object where double value will be written tooffset
- offset from object's base to the accessed locationx
- the double value to be writtenObject getObjectVolatile(Object base, long offset)
base
- the owner object where the referenced object will be read fromoffset
- offset from object's base to the accessed locationvoid putObjectVolatile(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 compareAndSwapInt(Object base, long offset, int expected, int x)
base
- the object where int value will be written tooffset
- offset from object's base to the accessed locationexpected
- the expected current int value to be set new int valuex
- the int value to be writtenboolean compareAndSwapLong(Object base, long offset, long expected, long x)
base
- the object where long value will be written tooffset
- offset from object's base to the accessed locationexpected
- the expected current long value to be set new long valuex
- the long value to be writtenboolean compareAndSwapObject(Object base, long offset, Object expected, Object x)
base
- the owner object where the referenced object will be written tooffset
- offset from object's base to the accessed locationexpected
- the expected current referenced object to be set to new referenced objectx
- the new referenced object that will be writtenvoid putOrderedInt(Object base, long offset, int x)
base
- the object where the int value will be written tooffset
- offset from object's base to the accessed locationx
- the int value to be writtenvoid putOrderedLong(Object base, long offset, long x)
base
- the object where the long value will be written tooffset
- offset from object's base to the accessed locationx
- the long value to be writtenvoid putOrderedObject(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 writtenCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.