Modifier and Type | Field and Description |
---|---|
protected Engine |
engine |
protected long |
recid |
protected Serializer<E> |
serializer |
Modifier | Constructor and Description |
---|---|
|
Atomic.Var(Engine engine,
long recid,
Serializer<E> serializer) |
protected |
Atomic.Var(Engine engine,
SerializerBase serializerBase,
DataInput is,
SerializerBase.FastArrayList<Object> objectStack)
used for deserialization
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSet(E expect,
E update)
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(E newValue)
Atomically sets to the given value and returns the previous value.
|
void |
set(E newValue)
Unconditionally sets to the given value.
|
String |
toString() |
protected final Engine engine
protected final long recid
protected final Serializer<E> serializer
public Atomic.Var(Engine engine, long recid, Serializer<E> serializer)
protected Atomic.Var(Engine engine, SerializerBase serializerBase, DataInput is, SerializerBase.FastArrayList<Object> objectStack) throws IOException
IOException
public final E get()
public final boolean compareAndSet(E expect, E update)
expect
- the expected valueupdate
- the new valuepublic final void set(E newValue)
newValue
- the new valueCopyright © 2014. All Rights Reserved.