public class DispatcherThread extends Thread implements Monitorable
| Modifier and Type | Class and Description |
|---|---|
static class |
DispatcherThread.DispatcherReport |
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
ArrayList |
__stack |
static AtomicInteger |
activeDispatchers |
protected boolean |
autoShutDown |
static boolean |
DUMP_CATCHED |
static int |
MILLIS_AFTER_CREATION_BEFORE_REBALANCING |
static int |
QUEUE_PERCENTAGE_TRIGGERING_REBALANCE |
static int |
SCHEDULE_TICK_NANOS |
protected boolean |
shutDown |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
DispatcherThread(Scheduler scheduler) |
DispatcherThread(Scheduler scheduler,
boolean autoShutDown) |
| Modifier and Type | Method and Description |
|---|---|
void |
addActor(Actor act) |
int |
getAccumulatedQSizes()
accumulated queue sizes of all actors
|
Actor[] |
getActors() |
int |
getLoad() |
int |
getQSize() |
IPromise |
getReport() |
Scheduler |
getScheduler() |
IPromise<Monitorable[]> |
getSubMonitorables() |
boolean |
isAutoShutDown() |
boolean |
isEmpty() |
boolean |
isIsolated() |
boolean |
isShutDown() |
boolean |
pollQs() |
boolean |
pollQs(Actor[] actors) |
protected CallEntry |
pollQueues(Actor[] actors) |
void |
run() |
void |
schedulePendingAdds()
add actors which have been marked to be scheduled on this
|
boolean |
schedules(Object receiverRef)
can be called from the dispacther thread itself only
|
void |
setAutoShutDown(boolean autoShutDown) |
void |
setIsolated(boolean isIsolated) |
void |
shutDown()
terminate operation after emptying Q
|
void |
shutDownImmediate()
terminate operation immediately.
|
String |
toString() |
void |
waitEmpty(long nanos)
blocking method, use for debugging only.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yieldpublic static boolean DUMP_CATCHED
public static int SCHEDULE_TICK_NANOS
public static int QUEUE_PERCENTAGE_TRIGGERING_REBALANCE
public static int MILLIS_AFTER_CREATION_BEFORE_REBALANCING
public static AtomicInteger activeDispatchers
protected boolean shutDown
public ArrayList __stack
protected volatile boolean autoShutDown
public DispatcherThread(Scheduler scheduler)
public DispatcherThread(Scheduler scheduler, boolean autoShutDown)
public boolean isIsolated()
public void setIsolated(boolean isIsolated)
public void addActor(Actor act)
public boolean isAutoShutDown()
public void setAutoShutDown(boolean autoShutDown)
public void schedulePendingAdds()
public boolean pollQs()
public boolean pollQs(Actor[] actors)
public int getLoad()
public int getAccumulatedQSizes()
public int getQSize()
public boolean isShutDown()
public void shutDown()
public void shutDownImmediate()
public boolean isEmpty()
public void waitEmpty(long nanos)
public Scheduler getScheduler()
public Actor[] getActors()
public boolean schedules(Object receiverRef)
receiverRef - public IPromise getReport()
getReport in interface Monitorablepublic IPromise<Monitorable[]> getSubMonitorables()
getSubMonitorables in interface MonitorableCopyright © 2015. All rights reserved.