public interface Scheduler
| Modifier and Type | Method and Description |
|---|---|
DispatcherThread |
assignDispatcher() |
void |
delayedCall(long millis,
Runnable toRun) |
Object |
enqueueCall(Actor sendingActor,
Actor receiver,
String methodName,
Object[] args) |
BackOffStrategy |
getBackoffStrategy() |
int |
getDefaultQSize() |
InvocationHandler |
getInvoker(Actor dispatcher,
Object toWrap) |
int |
getMaxThreads() |
<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 |
put2QueuePolling(Queue q,
Object o,
Object sender) |
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 |
tryStopThread(DispatcherThread dispatcherThread) |
Future<Future[]> |
yield(Future... futures)
wait for all futures to complete and return an array of fulfilled futures
e.g.
|
void |
yield(int count) |
<T> Future<List<Future<T>>> |
yield(List<Future<T>> futures) |
int getMaxThreads()
int getDefaultQSize()
void yield(int count)
Object enqueueCall(Actor sendingActor, Actor receiver, String methodName, Object[] args)
void threadStopped(DispatcherThread th)
InvocationHandler getInvoker(Actor dispatcher, Object toWrap)
<T> T inThread(Actor actor, T callback)
T - callback - void delayedCall(long millis,
Runnable toRun)
<T> void runBlockingCall(Actor emitter, Callable<T> toCall, Callback<T> resultHandler)
Future<Future[]> yield(Future... futures)
futures - DispatcherThread assignDispatcher()
void rebalance(DispatcherThread dispatcherThread)
dispatcherThread - BackOffStrategy getBackoffStrategy()
void tryStopThread(DispatcherThread dispatcherThread)
Copyright © 2014. All rights reserved.