@JsType(isNative=true,
name="Atomics",
namespace="<global>")
@Generated(value="org.realityforge.webtack")
public final class Atomics
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
add(IntegerTypedArray typedArray,
int index,
int value)
Add the provided value to the existing value at the specified index of the array.
|
static int |
and(IntegerTypedArray typedArray,
int index,
int value)
Computes a bitwise AND on the value at the specified index of the array with the provided value.
|
static int |
compareExchange(IntegerTypedArray typedArray,
int index,
int expectedValue,
int replacementValue)
Stores a value at the specified index of the array, if it equals a value.
|
static int |
exchange(IntegerTypedArray typedArray,
int index,
int value)
Stores a value at the specified index of the array.
|
static boolean |
isLockFree(int size)
An optimization primitive that can be used to determine whether to use locks or atomic operations.
|
static int |
load(IntegerTypedArray typedArray,
int index)
Returns the value at the specified index of the array.
|
static int |
or(IntegerTypedArray typedArray,
int index,
int value)
Computes a bitwise OR on the value at the specified index of the array with the provided value.
|
static int |
store(IntegerTypedArray typedArray,
int index,
int value)
Stores a value at the specified index of the array.
|
static int |
sub(IntegerTypedArray typedArray,
int index,
int value)
Subtracts a value at the specified index of the array.
|
static JsString |
wait_(IntegerTypedArray typedArray,
int index,
int value)
Verifies that the specified index of the array still contains a value and sleeps awaiting or times out.
|
static JsString |
wait_(IntegerTypedArray typedArray,
int index,
int value,
int timeout)
Verifies that the specified index of the array still contains a value and sleeps awaiting or times out.
|
static int |
xor(IntegerTypedArray typedArray,
int index,
int value)
Computes a bitwise XOR on the value at the specified index of the array with the provided value.
|
public static int add(@Nonnull
IntegerTypedArray typedArray,
int index,
int value)
public static int and(@Nonnull
IntegerTypedArray typedArray,
int index,
int value)
public static int compareExchange(@Nonnull
IntegerTypedArray typedArray,
int index,
int expectedValue,
int replacementValue)
public static int exchange(@Nonnull
IntegerTypedArray typedArray,
int index,
int value)
public static boolean isLockFree(int size)
public static int load(@Nonnull
IntegerTypedArray typedArray,
int index)
public static int or(@Nonnull
IntegerTypedArray typedArray,
int index,
int value)
public static int store(@Nonnull
IntegerTypedArray typedArray,
int index,
int value)
public static int sub(@Nonnull
IntegerTypedArray typedArray,
int index,
int value)
public static int xor(@Nonnull
IntegerTypedArray typedArray,
int index,
int value)
@JsMethod(name="wait") @Nonnull public static JsString wait_(@Nonnull IntegerTypedArray typedArray, int index, int value, int timeout)
@JsMethod(name="wait") @Nonnull public static JsString wait_(@Nonnull IntegerTypedArray typedArray, int index, int value)