|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mapdb.Atomic.String
public static final class Atomic.String
A String record that may be updated atomically.
| Field Summary | |
|---|---|
protected Engine |
engine
|
protected long |
recid
|
| Constructor Summary | |
|---|---|
Atomic.String(Engine engine,
long recid)
|
|
| Method Summary | |
|---|---|
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. |
long |
getRecid()
|
void |
set(String newValue)
Unconditionally sets to the given value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Engine engine
protected final long recid
| Constructor Detail |
|---|
public Atomic.String(Engine engine,
long recid)
| Method Detail |
|---|
public long getRecid()
public String toString()
toString in class Objectpublic final String get()
public final boolean compareAndSet(String expect,
String update)
expect - the expected valueupdate - the new value
public final void set(String newValue)
newValue - the new valuepublic final String getAndSet(String newValue)
newValue - the new value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||