Module org.elasticsearch.server
Class PrioritizedThrottledTaskRunner<T extends Comparable<T> & Runnable>
java.lang.Object
org.elasticsearch.common.util.concurrent.PrioritizedThrottledTaskRunner<T>
PrioritizedThrottledTaskRunner
performs the enqueued tasks in the order dictated by the
natural ordering of the tasks, limiting the max number of concurrently running tasks. Each new task
that is dequeued to be run, is forked off to the given executor.-
Constructor Summary
ConstructorDescriptionPrioritizedThrottledTaskRunner
(String name, int maxRunningTasks, Executor executor) -
Method Summary
-
Constructor Details
-
PrioritizedThrottledTaskRunner
-
-
Method Details
-
enqueueTask
-
pollAndSpawn
protected void pollAndSpawn() -
runningTasks
public int runningTasks() -
queueSize
public int queueSize()
-