public class ThrottledScheduler extends AbstractExecutorService
DefaultScheduler that has a limit on the tasks that can be run at the same time.
Exceeding tasks will block the caller, until a running task is finished.
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submitprotected void putTask(RunnableFuture<?> task, ScheduledFuture<?> scheduledFuture)
protected void removeTask(RunnableFuture<?> task)
public String toString()
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServicepublic <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServicepublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface ScheduledExecutorServicepublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface ScheduledExecutorServicepublic ScheduledFuture<?> scheduleWithCronExpression(Runnable command, String cronExpression)
scheduleWithCronExpression in interface org.mule.runtime.api.scheduler.Schedulerpublic ScheduledFuture<?> scheduleWithCronExpression(Runnable command, String cronExpression, TimeZone timeZone)
scheduleWithCronExpression in interface org.mule.runtime.api.scheduler.Schedulerpublic void setJobClass(Class<? extends QuartzCronJob> jobClass)
public void shutdown()
shutdown in interface ExecutorServicepublic List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServicepublic boolean isShutdown()
isShutdown in interface ExecutorServicepublic boolean isTerminated()
isTerminated in interface ExecutorServicepublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedExceptionpublic void stop(long gracefulShutdownTimeout,
TimeUnit unit)
stop in interface org.mule.runtime.api.scheduler.Schedulerprotected <T> RunnableFuture<T> newTaskFor(Callable<T> callable)
newTaskFor in class AbstractExecutorServiceprotected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)
newTaskFor in class AbstractExecutorServiceprotected void checkShutdown()
protected void taskFinished(RunnableFuture<?> task)
public ThreadType getThreadType()
public String getName()
getName in interface org.mule.runtime.api.scheduler.SchedulerCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.