public class Agent extends ARef
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Agent.Action |
(package private) static class |
Agent.ActionQueue |
Modifier and Type | Field and Description |
---|---|
(package private) java.util.concurrent.atomic.AtomicReference<Agent.ActionQueue> |
aq |
(package private) static Keyword |
CONTINUE |
(package private) IFn |
errorHandler |
(package private) Keyword |
errorMode |
(package private) static Keyword |
FAIL |
(package private) static java.lang.ThreadLocal<IPersistentVector> |
nested |
static java.util.concurrent.ExecutorService |
pooledExecutor |
private static java.util.concurrent.atomic.AtomicLong |
sendOffThreadPoolCounter |
private static java.util.concurrent.atomic.AtomicLong |
sendThreadPoolCounter |
static java.util.concurrent.ExecutorService |
soloExecutor |
(package private) java.lang.Object |
state |
Constructor and Description |
---|
Agent(java.lang.Object state) |
Agent(java.lang.Object state,
IPersistentMap meta) |
Modifier and Type | Method and Description |
---|---|
private static java.util.concurrent.ThreadFactory |
createThreadFactory(java.lang.String format,
java.util.concurrent.atomic.AtomicLong threadPoolCounter) |
java.lang.Object |
deref() |
java.lang.Object |
dispatch(IFn fn,
ISeq args,
java.util.concurrent.Executor exec) |
(package private) static void |
dispatchAction(Agent.Action action) |
(package private) void |
enqueue(Agent.Action action) |
java.lang.Throwable |
getError() |
IFn |
getErrorHandler() |
Keyword |
getErrorMode() |
int |
getQueueCount() |
static int |
releasePendingSends() |
java.lang.Object |
restart(java.lang.Object newState,
boolean clearActions) |
void |
setErrorHandler(IFn f) |
void |
setErrorMode(Keyword k) |
(package private) boolean |
setState(java.lang.Object newState) |
static void |
shutdown() |
addWatch, getValidator, getWatches, notifyWatches, removeWatch, setValidator, validate, validate
alterMeta, meta, resetMeta
static final Keyword CONTINUE
static final Keyword FAIL
volatile java.lang.Object state
java.util.concurrent.atomic.AtomicReference<Agent.ActionQueue> aq
volatile Keyword errorMode
volatile IFn errorHandler
private static final java.util.concurrent.atomic.AtomicLong sendThreadPoolCounter
private static final java.util.concurrent.atomic.AtomicLong sendOffThreadPoolCounter
public static volatile java.util.concurrent.ExecutorService pooledExecutor
public static volatile java.util.concurrent.ExecutorService soloExecutor
static final java.lang.ThreadLocal<IPersistentVector> nested
public Agent(java.lang.Object state)
public Agent(java.lang.Object state, IPersistentMap meta)
private static java.util.concurrent.ThreadFactory createThreadFactory(java.lang.String format, java.util.concurrent.atomic.AtomicLong threadPoolCounter)
public static void shutdown()
boolean setState(java.lang.Object newState)
public java.lang.Object deref()
public java.lang.Throwable getError()
public void setErrorMode(Keyword k)
public Keyword getErrorMode()
public void setErrorHandler(IFn f)
public IFn getErrorHandler()
public java.lang.Object restart(java.lang.Object newState, boolean clearActions)
static void dispatchAction(Agent.Action action)
void enqueue(Agent.Action action)
public int getQueueCount()
public static int releasePendingSends()