public static final class Atomic.String
extends java.lang.Object
String record that may be updated atomically.| Modifier and Type | Field and Description |
|---|---|
protected Engine |
engine |
protected long |
recid |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareAndSet(java.lang.String expect,
java.lang.String update)
Atomically sets the value to the given updated value
if the current value equals the expected value.
|
java.lang.String |
get()
Returns the current value.
|
java.lang.String |
getAndSet(java.lang.String newValue)
Atomically sets to the given value and returns the previous value.
|
long |
getRecid() |
void |
set(java.lang.String newValue)
Unconditionally sets to the given value.
|
java.lang.String |
toString() |
protected final Engine engine
protected final long recid
public String(Engine engine, long recid)
public long getRecid()
public java.lang.String toString()
toString in class java.lang.Objectpublic final java.lang.String get()
public final boolean compareAndSet(java.lang.String expect,
java.lang.String update)
expect - the expected valueupdate - the new valuepublic final void set(java.lang.String newValue)
newValue - the new valuepublic final java.lang.String getAndSet(java.lang.String newValue)
newValue - the new value