Class ThreadPool
- java.lang.Object
- 
- java.util.concurrent.AbstractExecutorService
- 
- java.util.concurrent.ThreadPoolExecutor
- 
- org.eclipse.net4j.util.concurrent.ThreadPool
 
 
 
- 
- All Implemented Interfaces:
- java.util.concurrent.Executor,- java.util.concurrent.ExecutorService,- java.util.concurrent.RejectedExecutionHandler
 
 public class ThreadPool extends java.util.concurrent.ThreadPoolExecutor implements java.util.concurrent.RejectedExecutionHandler- Since:
- 3.6
- Author:
- Eike Stepper
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutorjava.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_CORE_POOL_SIZEstatic longDEFAULT_KEEP_ALIVE_SECONDSstatic intDEFAULT_MAXIMUM_POOL_SIZEstatic java.lang.StringDEFAULT_THREAD_GROUP_NAME
 - 
Constructor SummaryConstructors Constructor Description ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.ThreadFactory threadFactory)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterExecute(java.lang.Runnable task, java.lang.Throwable ex)protected voidbeforeExecute(java.lang.Thread worker, java.lang.Runnable task)static ThreadPoolcreate()static ThreadPoolcreate(java.lang.String description)static ThreadPoolcreate(java.lang.String threadGroupName, int corePoolSize, int maximumPoolSize, long keepAliveSeconds)intgetActiveCount()java.util.concurrent.RejectedExecutionHandlergetRejectedExecutionHandler()protected voidpotentialDeadlockDetected()voidrejectedExecution(java.lang.Runnable task, java.util.concurrent.ThreadPoolExecutor executor)voidsetRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler handler)- 
Methods inherited from class java.util.concurrent.ThreadPoolExecutorallowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, execute, finalize, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setThreadFactory, shutdown, shutdownNow, terminated, toString
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_THREAD_GROUP_NAMEpublic static final java.lang.String DEFAULT_THREAD_GROUP_NAME - See Also:
- Constant Field Values
 
 - 
DEFAULT_CORE_POOL_SIZEpublic static final int DEFAULT_CORE_POOL_SIZE - See Also:
- Constant Field Values
 
 - 
DEFAULT_MAXIMUM_POOL_SIZEpublic static final int DEFAULT_MAXIMUM_POOL_SIZE - See Also:
- Constant Field Values
 
 - 
DEFAULT_KEEP_ALIVE_SECONDSpublic static final long DEFAULT_KEEP_ALIVE_SECONDS - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setRejectedExecutionHandlerpublic void setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler handler) - Overrides:
- setRejectedExecutionHandlerin class- java.util.concurrent.ThreadPoolExecutor
 
 - 
getRejectedExecutionHandlerpublic java.util.concurrent.RejectedExecutionHandler getRejectedExecutionHandler() - Overrides:
- getRejectedExecutionHandlerin class- java.util.concurrent.ThreadPoolExecutor
 
 - 
rejectedExecutionpublic void rejectedExecution(java.lang.Runnable task, java.util.concurrent.ThreadPoolExecutor executor)- Specified by:
- rejectedExecutionin interface- java.util.concurrent.RejectedExecutionHandler
 
 - 
getActiveCountpublic int getActiveCount() - Overrides:
- getActiveCountin class- java.util.concurrent.ThreadPoolExecutor
 
 - 
beforeExecuteprotected void beforeExecute(java.lang.Thread worker, java.lang.Runnable task)- Overrides:
- beforeExecutein class- java.util.concurrent.ThreadPoolExecutor
 
 - 
afterExecuteprotected void afterExecute(java.lang.Runnable task, java.lang.Throwable ex)- Overrides:
- afterExecutein class- java.util.concurrent.ThreadPoolExecutor
 
 - 
potentialDeadlockDetectedprotected void potentialDeadlockDetected() - Since:
- 3.9
 
 - 
createpublic static ThreadPool create() 
 - 
createpublic static ThreadPool create(java.lang.String description) 
 - 
createpublic static ThreadPool create(java.lang.String threadGroupName, int corePoolSize, int maximumPoolSize, long keepAliveSeconds) 
 
- 
 
-