public static final class Atomic.String
extends java.lang.Object
String
record that may be updated atomically.Modifier and Type | Field and Description |
---|---|
protected long |
recid |
protected org.mapdb.Store |
store |
Constructor and Description |
---|
String(org.mapdb.Store store,
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() |
public long getRecid()
public java.lang.String toString()
toString
in class java.lang.Object
public 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 valueCopyright © 2018. All Rights Reserved.