|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.elasticsearch.common.util.concurrent.DynamicThreadPoolExecutor
public class DynamicThreadPoolExecutor
An ExecutorService that executes each submitted task using one of
possibly several pooled threads, normally configured using
DynamicExecutors factory methods.
| Nested Class Summary | |
|---|---|
static class |
DynamicThreadPoolExecutor.DynamicQueue<E>
Much like a SynchronousQueue which acts as a rendezvous channel. |
static class |
DynamicThreadPoolExecutor.ForceQueuePolicy
A handler for rejected tasks that adds the specified element to this queue, waiting if necessary for space to become available. |
static class |
DynamicThreadPoolExecutor.TimedBlockingPolicy
A handler for rejected tasks that inserts the specified element into this queue, waiting if necessary up to the specified wait time for space to become available. |
| Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor |
|---|
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy |
| Constructor Summary | |
|---|---|
DynamicThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
java.util.concurrent.ThreadFactory threadFactory)
|
|
| Method Summary | |
|---|---|
protected void |
afterExecute(java.lang.Runnable r,
java.lang.Throwable t)
|
protected void |
beforeExecute(java.lang.Thread t,
java.lang.Runnable r)
|
int |
getActiveCount()
|
| Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
|---|
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, execute, finalize, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated |
| Methods inherited from class java.util.concurrent.AbstractExecutorService |
|---|
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DynamicThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
java.util.concurrent.ThreadFactory threadFactory)
| Method Detail |
|---|
public int getActiveCount()
getActiveCount in class java.util.concurrent.ThreadPoolExecutor
protected void beforeExecute(java.lang.Thread t,
java.lang.Runnable r)
beforeExecute in class java.util.concurrent.ThreadPoolExecutor
protected void afterExecute(java.lang.Runnable r,
java.lang.Throwable t)
afterExecute in class java.util.concurrent.ThreadPoolExecutor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||