public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor
PrioritizedRunnable and/or PrioritizedCallable, those tasks that are not instances of these two will
be wrapped and assign a default Priority.NORMAL priority.
Note, if two tasks have the same priority, the first to arrive will be executed first (FIFO style).
| Modifier and Type | Class and Description |
|---|---|
static class |
PrioritizedEsThreadPoolExecutor.Pending |
EsThreadPoolExecutor.ShutdownListenerThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
protected void |
beforeExecute(Thread t,
Runnable r) |
void |
execute(Runnable command) |
void |
execute(Runnable command,
ScheduledExecutorService timer,
TimeValue timeout,
Runnable timeoutCallback) |
TimeValue |
getMaxTaskWaitTime()
Returns the waiting time of the first task in the queue
|
int |
getNumberOfPendingTasks() |
PrioritizedEsThreadPoolExecutor.Pending[] |
getPending() |
protected <T> RunnableFuture<T> |
newTaskFor(Callable<T> callable) |
protected <T> RunnableFuture<T> |
newTaskFor(Runnable runnable,
T value) |
shutdown, terminated, toStringallowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNowpublic PrioritizedEsThreadPoolExecutor.Pending[] getPending()
public int getNumberOfPendingTasks()
public TimeValue getMaxTaskWaitTime()
protected void beforeExecute(Thread t, Runnable r)
beforeExecute in class ThreadPoolExecutorprotected void afterExecute(Runnable r, Throwable t)
afterExecute in class ThreadPoolExecutorpublic void execute(Runnable command, ScheduledExecutorService timer, TimeValue timeout, Runnable timeoutCallback)
public void execute(Runnable command)
execute in interface Executorexecute in class EsThreadPoolExecutorprotected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)
newTaskFor in class AbstractExecutorServiceprotected <T> RunnableFuture<T> newTaskFor(Callable<T> callable)
newTaskFor in class AbstractExecutorServiceCopyright © 2009–2016. All rights reserved.