public class DefaultSchedulerService extends Object implements SchedulerService, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable
SchedulerService.
Schedulers provided by this implementation of SchedulerService use a shared single-threaded
ScheduledExecutorService for scheduling work. When a scheduled tasks is fired, they are executed using the
Scheduler's own executor.
The returned Schedulers have an AbortPolicy rejection policy. That means that when sending a task to a full
Scheduler a RejectedExecutionException will be thrown.
| Constructor and Description |
|---|
DefaultSchedulerService() |
| Modifier and Type | Method and Description |
|---|---|
Scheduler |
cpuIntensiveScheduler() |
Scheduler |
cpuLightScheduler() |
ThreadType |
currentThreadType() |
Scheduler |
customScheduler(String name,
int corePoolSize) |
Scheduler |
customScheduler(String name,
int corePoolSize,
int queueSize) |
String |
getName() |
Scheduler |
ioScheduler() |
void |
start() |
void |
stop() |
protected void |
waitForExecutorTermination(long startMillis,
ExecutorService executor,
String executorLabel) |
public String getName()
getName in interface org.mule.runtime.api.meta.NamedObjectpublic Scheduler cpuLightScheduler()
cpuLightScheduler in interface SchedulerServicepublic Scheduler ioScheduler()
ioScheduler in interface SchedulerServicepublic Scheduler cpuIntensiveScheduler()
cpuIntensiveScheduler in interface SchedulerServicepublic Scheduler customScheduler(String name, int corePoolSize)
customScheduler in interface SchedulerServicepublic Scheduler customScheduler(String name, int corePoolSize, int queueSize)
customScheduler in interface SchedulerServicepublic ThreadType currentThreadType()
currentThreadType in interface SchedulerServicepublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionprotected void waitForExecutorTermination(long startMillis,
ExecutorService executor,
String executorLabel)
throws InterruptedException
InterruptedExceptionCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.