Modifier and Type | Field and Description |
---|---|
protected Engine |
engine |
protected long |
recid |
Constructor and Description |
---|
Atomic.String(Engine engine,
long recid) |
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSet(String expect,
String update)
Atomically sets the value to the given updated value
if the current value equals the expected value.
|
String |
get()
Returns the current value.
|
String |
getAndSet(String newValue)
Atomically sets to the given value and returns the previous value.
|
void |
set(String newValue)
Unconditionally sets to the given value.
|
String |
toString() |
protected final Engine engine
protected final long recid
public Atomic.String(Engine engine, long recid)
public final String get()
public final boolean compareAndSet(String expect, String update)
expect
- the expected valueupdate
- the new valuepublic final void set(String newValue)
newValue
- the new valueCopyright © 2014. All Rights Reserved.