public class SimpleScheduler extends Object implements Scheduler
| Modifier and Type | Field and Description |
|---|---|
protected BackOffStrategy |
backOffStrategy |
static long |
BLOCKED_MS_TIL_WARN
time ms until a warning is printed once a sender is blocked by a
full actor queue
|
static boolean |
DEBUG_SCHEDULING |
static int |
DEFQSIZE |
protected DispatcherThread |
myThread |
| Modifier | Constructor and Description |
|---|---|
|
SimpleScheduler() |
|
SimpleScheduler(int qsize) |
protected |
SimpleScheduler(String dummy) |
| Modifier and Type | Method and Description |
|---|---|
DispatcherThread |
assignDispatcher(int minLoadPerc) |
void |
delayedCall(long millis,
Runnable toRun) |
Object |
enqueueCall(Actor sendingActor,
Actor receiver,
String methodName,
Object[] args,
boolean isCB) |
Object |
enqueueCallFromRemote(RemoteRegistry reg,
Actor sendingActor,
Actor receiver,
String methodName,
Object[] args,
boolean isCB) |
BackOffStrategy |
getBackoffStrategy() |
int |
getDefaultQSize() |
InvocationHandler |
getInvoker(Actor dispatcher,
Object toWrap) |
int |
getNumActors() |
IPromise |
getReport() |
IPromise<Monitorable[]> |
getSubMonitorables() |
<T> T |
inThread(Actor actor,
T callback)
Creates a wrapper on the given object enqueuing all calls to INTERFACE methods of the given object to the given actors's queue.
|
void |
pollDelay(int count) |
IPromise |
put2QueuePolling(CallEntry e) |
void |
put2QueuePolling(Queue q,
boolean isCBQ,
Object o,
Object receiver) |
void |
rebalance(DispatcherThread dispatcherThread)
called from inside overloaded thread with load
all actors assigned to the calling thread therefore can be safely moved
|
<T> void |
runBlockingCall(Actor emitter,
Callable<T> toCall,
Callback<T> resultHandler) |
void |
threadStopped(DispatcherThread th) |
void |
tryIsolate(DispatcherThread dp,
Actor actorRef) |
void |
tryStopThread(DispatcherThread dispatcherThread) |
public static final boolean DEBUG_SCHEDULING
public static long BLOCKED_MS_TIL_WARN
public static int DEFQSIZE
protected BackOffStrategy backOffStrategy
protected DispatcherThread myThread
protected SimpleScheduler(String dummy)
public SimpleScheduler()
public SimpleScheduler(int qsize)
public int getDefaultQSize()
getDefaultQSize in interface Schedulerpublic void put2QueuePolling(Queue q, boolean isCBQ, Object o, Object receiver)
put2QueuePolling in interface Schedulerpublic Object enqueueCall(Actor sendingActor, Actor receiver, String methodName, Object[] args, boolean isCB)
enqueueCall in interface Schedulerpublic Object enqueueCallFromRemote(RemoteRegistry reg, Actor sendingActor, Actor receiver, String methodName, Object[] args, boolean isCB)
enqueueCallFromRemote in interface Schedulerpublic void threadStopped(DispatcherThread th)
threadStopped in interface Schedulerpublic InvocationHandler getInvoker(Actor dispatcher, Object toWrap)
getInvoker in interface Schedulerpublic <T> T inThread(Actor actor, T callback)
Schedulerpublic void delayedCall(long millis,
Runnable toRun)
delayedCall in interface Schedulerpublic <T> void runBlockingCall(Actor emitter, Callable<T> toCall, Callback<T> resultHandler)
runBlockingCall in interface Schedulerpublic DispatcherThread assignDispatcher(int minLoadPerc)
assignDispatcher in interface Schedulerpublic void rebalance(DispatcherThread dispatcherThread)
Schedulerpublic BackOffStrategy getBackoffStrategy()
getBackoffStrategy in interface Schedulerpublic void tryStopThread(DispatcherThread dispatcherThread)
tryStopThread in interface Schedulerpublic void tryIsolate(DispatcherThread dp, Actor actorRef)
tryIsolate in interface Schedulerpublic int getNumActors()
getNumActors in interface Schedulerpublic IPromise getReport()
getReport in interface Monitorablepublic IPromise<Monitorable[]> getSubMonitorables()
getSubMonitorables in interface MonitorableCopyright © 2015. All rights reserved.