Package org.jboss.weld.executor
Class TimingOutFixedThreadPoolExecutorServices
- java.lang.Object
-
- org.jboss.weld.executor.AbstractExecutorServices
-
- org.jboss.weld.executor.TimingOutFixedThreadPoolExecutorServices
-
- All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service,org.jboss.weld.manager.api.ExecutorServices
public class TimingOutFixedThreadPoolExecutorServices extends AbstractExecutorServices
Implementation ofExtendedExecutorServicesthat uses a fixed thread pool. However threads are terminated if no new tasks arrive within the keep-alive time.- Author:
- Martin Kouba
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.weld.manager.api.ExecutorServices
org.jboss.weld.manager.api.ExecutorServices.TaskFactory<T extends Object>
-
-
Constructor Summary
Constructors Constructor Description TimingOutFixedThreadPoolExecutorServices(int threadPoolSize, long keepAliveTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPoolSize()ExecutorServicegetTaskExecutor()protected intgetThreadPoolSize()Indicates the maximum number of threads in this thread pool.StringtoString()-
Methods inherited from class org.jboss.weld.executor.AbstractExecutorServices
checkForExceptions, cleanup, getTimerExecutor, invokeAllAndCheckForExceptions, invokeAllAndCheckForExceptions, shutdown, wrap
-
-
-
-
Method Detail
-
getPoolSize
public int getPoolSize()
-
getTaskExecutor
public ExecutorService getTaskExecutor()
-
getThreadPoolSize
protected int getThreadPoolSize()
Description copied from class:AbstractExecutorServicesIndicates the maximum number of threads in this thread pool. If the value is unknown or if the max number of threads is not bounded this method should return -1- Specified by:
getThreadPoolSizein classAbstractExecutorServices
-
-