public static class Atomic.Var<E>
Atomically updated variable which may contain any type of record.
Modifier and Type | Field and Description |
---|---|
long |
recid |
Serializer<E> |
serializer |
Store |
store |
Constructor and Description |
---|
Var() |
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSet()
Atomically sets the value to the given updated value if the current value equals the expected value.
|
E |
get()
Returns the current value.
|
E |
getAndSet()
Atomically sets to the given value and returns the previous value.
|
long |
getRecid() |
void |
set()
Unconditionally sets to the given value.
|
java.lang.String |
toString() |
public Store store
public long recid
public Serializer<E> serializer
public long getRecid()
public java.lang.String toString()
public E get()
Returns the current value.
public boolean compareAndSet()
Atomically sets the value to the given updated value if the current value equals the expected value.
public void set()
Unconditionally sets to the given value.
public E getAndSet()
Atomically sets to the given value and returns the previous value.