public class FiberForkJoinScheduler extends FiberScheduler
ForkJoinPool based scheduler for fibers.| Constructor and Description |
|---|
FiberForkJoinScheduler(java.lang.String name,
int parallelism)
Creates a new fiber scheduler using a default
UncaughtExceptionHandler and no monitoring. |
FiberForkJoinScheduler(java.lang.String name,
int parallelism,
MonitorType monitorType,
boolean detailedInfo)
Creates a new fiber scheduler using a default
UncaughtExceptionHandler. |
FiberForkJoinScheduler(java.lang.String name,
int parallelism,
java.lang.Thread.UncaughtExceptionHandler exceptionHandler,
MonitorType monitorType,
boolean detailedInfo)
Creates a new fiber scheduler.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.Executor |
getExecutor() |
java.util.concurrent.ForkJoinPool |
getForkJoinPool() |
protected int |
getQueueLength() |
protected boolean |
isCurrentThreadInScheduler() |
static boolean |
isFiberThread(java.lang.Thread t) |
protected void |
onIdle() |
void |
shutdown() |
getMonitor, getName, newFiber, newStrandpublic FiberForkJoinScheduler(java.lang.String name,
int parallelism,
java.lang.Thread.UncaughtExceptionHandler exceptionHandler,
MonitorType monitorType,
boolean detailedInfo)
name - the scheuler's name. This name is used in naming the scheduler's threads.parallelism - the number of threads in the poolexceptionHandler - an UncaughtExceptionHandler to be used for exceptions thrown in fibers that aren't caught.monitorType - the MonitorType type to use for the ForkJoinPool.detailedInfo - whether detailed information about the fibers is collected by the fibers monitor.public FiberForkJoinScheduler(java.lang.String name,
int parallelism,
MonitorType monitorType,
boolean detailedInfo)
UncaughtExceptionHandler.name - the scheuler's name. This name is used in naming the scheduler's threads.parallelism - the number of threads in the poolmonitorType - the MonitorType type to use for the ForkJoinPool.detailedInfo - whether detailed information about the fibers is collected by the fibers monitor.public FiberForkJoinScheduler(java.lang.String name,
int parallelism)
UncaughtExceptionHandler and no monitoring.name - the scheuler's name. This name is used in naming the scheduler's threads.parallelism - the number of threads in the poolpublic void shutdown()
shutdown in class FiberSchedulerpublic java.util.concurrent.ForkJoinPool getForkJoinPool()
public java.util.concurrent.Executor getExecutor()
getExecutor in class FiberSchedulerprotected int getQueueLength()
getQueueLength in class FiberSchedulerprotected final boolean isCurrentThreadInScheduler()
isCurrentThreadInScheduler in class FiberSchedulerpublic static boolean isFiberThread(java.lang.Thread t)
protected void onIdle()