public interface ConcurrentMemoryAccessor extends MemoryAccessor
MemoryAccessor
for memory operations with concurrent semantics:
volatile, ordered, and CAS.Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSwapInt(long address,
int expected,
int x)
Compares and swaps the given int value to the expected value atomically
based in the given object with given offset
if and only if its current value equals to specified expected value.
|
boolean |
compareAndSwapLong(long address,
long expected,
long x)
Compares and swaps the long value to the expected value atomically
based in the given object with given offset
if and only if its current value equals the expected value.
|
boolean |
compareAndSwapObject(long address,
Object expected,
Object x)
Compares and swaps the referenced object to the expected object atomically
based by given owner object at given offset
if and only if its current referenced object is the expected object.
|
boolean |
getBooleanVolatile(long address)
Reads the boolean value as volatile from given object by its offset.
|
byte |
getByteVolatile(long address)
Reads the byte value as volatile from given object by its offset.
|
char |
getCharVolatile(long address)
Reads the char value as volatile from given object by its offset.
|
double |
getDoubleVolatile(long address)
Reads the double value as volatile from given object by its offset.
|
float |
getFloatVolatile(long address)
Reads the float value as volatile from given object by its offset.
|
int |
getIntVolatile(long address)
Reads the int value as volatile from given object by its offset.
|
long |
getLongVolatile(long address)
Reads the long value as volatile from given object by its offset.
|
short |
getShortVolatile(long address)
Reads the short value as volatile from given object by its offset.
|
void |
putBooleanVolatile(long address,
boolean x)
Writes the boolean value as volatile to given object by its offset.
|
void |
putByteVolatile(long address,
byte x)
Writes the byte value as volatile to given object by its offset.
|
void |
putCharVolatile(long address,
char x)
Writes the char value as volatile to given object by its offset.
|
void |
putDoubleVolatile(long address,
double x)
Writes the double value as volatile to given object by its offset.
|
void |
putFloatVolatile(long address,
float x)
Writes the float value as volatile to given object by its offset.
|
void |
putIntVolatile(long address,
int x)
Writes the int value as volatile to given object by its offset.
|
void |
putLongVolatile(long address,
long x)
Writes the long value as volatile to given object by its offset.
|
void |
putOrderedInt(long address,
int x)
Puts the given int value as ordered to the CPU write buffer
based in the given object at the given offset.
|
void |
putOrderedLong(long address,
long x)
Puts the given long value as ordered to the CPU write buffer
based in the given object at the given offset.
|
void |
putOrderedObject(long address,
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(long address,
short x)
Writes the short value as volatile to given object by its offset.
|
copyFromByteArray, copyMemory, copyToByteArray, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getShort, isBigEndian, putBoolean, putByte, putChar, putDouble, putFloat, putInt, putLong, putShort, setMemory
boolean getBooleanVolatile(long address)
address
- address to accessvoid putBooleanVolatile(long address, boolean x)
address
- address to accessx
- the boolean value to be writtenbyte getByteVolatile(long address)
address
- address to accessvoid putByteVolatile(long address, byte x)
address
- address to accessx
- the byte value to be writtenchar getCharVolatile(long address)
address
- address to accessvoid putCharVolatile(long address, char x)
address
- address to accessx
- the char value to be writtenshort getShortVolatile(long address)
address
- address to accessvoid putShortVolatile(long address, short x)
address
- address to accessx
- the short value to be writtenint getIntVolatile(long address)
address
- address to accessvoid putIntVolatile(long address, int x)
address
- address to accessx
- the int value to be writtenfloat getFloatVolatile(long address)
address
- address to accessvoid putFloatVolatile(long address, float x)
address
- address to accessx
- the float value to be writtenlong getLongVolatile(long address)
address
- address to accessvoid putLongVolatile(long address, long x)
address
- address to accessx
- the long value to be writtendouble getDoubleVolatile(long address)
address
- address to accessvoid putDoubleVolatile(long address, double x)
address
- address to accessx
- the double value to be writtenboolean compareAndSwapInt(long address, int expected, int x)
address
- address to accessexpected
- the expected current int value to be set to the new int valuex
- the int value to be writtenboolean compareAndSwapLong(long address, long expected, long x)
address
- address to accessexpected
- the expected current long value to be set to the new long valuex
- the long value to be writtenboolean compareAndSwapObject(long address, Object expected, Object x)
address
- address to accessexpected
- the expected current object to be set to the new referenced objectx
- the referenced object to be writtenvoid putOrderedInt(long address, int x)
address
- address to accessx
- the int value to be writtenvoid putOrderedLong(long address, long x)
address
- address to accessx
- the long value to be writtenvoid putOrderedObject(long address, Object x)
address
- address to accessx
- the referenced object to be writtenCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.