public final class Atom extends ARef
Modifier and Type | Field and Description |
---|---|
(package private) java.util.concurrent.atomic.AtomicReference |
state |
Constructor and Description |
---|
Atom(java.lang.Object state) |
Atom(java.lang.Object state,
IPersistentMap meta) |
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSet(java.lang.Object oldv,
java.lang.Object newv) |
java.lang.Object |
deref() |
java.lang.Object |
reset(java.lang.Object newval) |
java.lang.Object |
swap(IFn f) |
java.lang.Object |
swap(IFn f,
java.lang.Object arg) |
java.lang.Object |
swap(IFn f,
java.lang.Object arg1,
java.lang.Object arg2) |
java.lang.Object |
swap(IFn f,
java.lang.Object x,
java.lang.Object y,
ISeq args) |
addWatch, getValidator, getWatches, notifyWatches, removeWatch, setValidator, validate, validate
alterMeta, meta, resetMeta
public Atom(java.lang.Object state)
public Atom(java.lang.Object state, IPersistentMap meta)
public java.lang.Object deref()
public java.lang.Object swap(IFn f)
public java.lang.Object swap(IFn f, java.lang.Object arg)
public java.lang.Object swap(IFn f, java.lang.Object arg1, java.lang.Object arg2)
public boolean compareAndSet(java.lang.Object oldv, java.lang.Object newv)
public java.lang.Object reset(java.lang.Object newval)