public class ForkJoinScheduler extends Scheduler implements TimerService.WatchdogContext
Scheduler.LoggerdefaultLogger, defaultNumberThreads, defaultScheduler, pinnableScheduler, shutdown| Constructor and Description |
|---|
ForkJoinScheduler(int numThreads) |
| Modifier and Type | Method and Description |
|---|---|
void |
idledown()
block the thread till a moment at which all scheduled tasks have completed and then shutdown the scheduler
does not prevent scheduling new tasks (from other threads) until the shutdown is complete so such a task
could be partially executed
|
boolean |
isEmpty() |
boolean |
isEmptyish()
are the queues empty allows false positives, but not false negatives ie, if this method returns false, then
at some moment during the call at least one queue was non-empty if it returns true then for each queue there
was a moment during the call when it was empty
|
boolean |
isPinnable() |
static void |
main(java.lang.String[] args)
run the main method from another class using this scheduler as the default scheduler
|
int |
numThreads() |
void |
publish(java.lang.Runnable task) |
void |
publish(TimerService.WatchdogTask dog) |
void |
schedule(int index,
Task task)
schedule a task to run
|
void |
scheduleTimer(Timer t) |
void |
shutdown() |
boolean |
waitIdle(int delay) |
getCurrentTask, getDefaultPinnable, getDefaultScheduler, getPinnable, isShutdown, log, logRelay, make, schedule, setCurrentTask, setDefaultPinnable, setDefaultScheduler, setLoggerpublic void publish(TimerService.WatchdogTask dog)
publish in interface TimerService.WatchdogContextpublic boolean isEmpty()
isEmpty in interface TimerService.WatchdogContextpublic boolean isPinnable()
isPinnable in class Schedulerpublic void schedule(int index,
Task task)
Schedulerpublic void publish(java.lang.Runnable task)
public boolean isEmptyish()
SchedulerisEmptyish in interface TimerService.WatchdogContextisEmptyish in class Schedulerpublic int numThreads()
numThreads in class Schedulerpublic void scheduleTimer(Timer t)
scheduleTimer in class Schedulerpublic void idledown()
Schedulerpublic boolean waitIdle(int delay)
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception