|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mapdb.Atomic.Boolean
public static final class Atomic.Boolean
A boolean record that may be updated atomically.
| Field Summary | |
|---|---|
protected Engine |
engine
|
protected long |
recid
|
| Constructor Summary | |
|---|---|
Atomic.Boolean(Engine engine,
long recid)
|
|
| Method Summary | |
|---|---|
boolean |
compareAndSet(boolean expect,
boolean update)
Atomically sets the value to the given updated value if the current value == the expected value. |
boolean |
get()
Returns the current value. |
boolean |
getAndSet(boolean newValue)
Atomically sets to the given value and returns the previous value. |
long |
getRecid()
|
void |
set(boolean newValue)
Unconditionally sets to the given value. |
String |
toString()
Returns the String representation of the current value. |
| 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.Boolean(Engine engine,
long recid)
| Method Detail |
|---|
public long getRecid()
public final boolean get()
public final boolean compareAndSet(boolean expect,
boolean update)
== the expected value.
expect - the expected valueupdate - the new value
public final void set(boolean newValue)
newValue - the new valuepublic final boolean getAndSet(boolean newValue)
newValue - the new value
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||