public static final class Atomic.Boolean
extends java.lang.Object
boolean record that may be updated atomically.| Modifier and Type | Field and Description |
|---|---|
protected long |
recid |
protected org.mapdb.Store |
store |
| Constructor and Description |
|---|
Boolean(org.mapdb.Store store,
long recid) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.String |
toString()
Returns the String representation of the current value.
|
public long getRecid()
public final boolean get()
public final boolean compareAndSet(boolean expect,
boolean update)
== the expected value.expect - the expected valueupdate - the new valuepublic final void set(boolean newValue)
newValue - the new valuepublic final boolean getAndSet(boolean newValue)
newValue - the new valuepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All Rights Reserved.