Package org.infinispan.commons.executors
Class BlockingThreadPoolExecutorFactory
- java.lang.Object
-
- org.infinispan.commons.executors.BlockingThreadPoolExecutorFactory
-
- All Implemented Interfaces:
ThreadPoolExecutorFactory<ExecutorService>
public class BlockingThreadPoolExecutorFactory extends Object implements ThreadPoolExecutorFactory<ExecutorService>
- Author:
- Galder ZamarreƱo
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_KEEP_ALIVE_MILLIS
-
Constructor Summary
Constructors Constructor Description BlockingThreadPoolExecutorFactory(int maxThreads, int coreThreads, int queueLength, long keepAlive)BlockingThreadPoolExecutorFactory(int maxThreads, int coreThreads, int queueLength, long keepAlive, boolean nonBlocking)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcoreThreads()static BlockingThreadPoolExecutorFactorycreate(int maxThreads, int queueSize, boolean nonBlocking)ExecutorServicecreateExecutor(ThreadFactory threadFactory)booleancreatesNonBlockingThreads()longkeepAlive()intmaxThreads()intqueueLength()StringtoString()voidvalidate()Validate parameters for the thread pool executor factory
-
-
-
Field Detail
-
DEFAULT_KEEP_ALIVE_MILLIS
public static final int DEFAULT_KEEP_ALIVE_MILLIS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BlockingThreadPoolExecutorFactory
public BlockingThreadPoolExecutorFactory(int maxThreads, int coreThreads, int queueLength, long keepAlive)
-
BlockingThreadPoolExecutorFactory
public BlockingThreadPoolExecutorFactory(int maxThreads, int coreThreads, int queueLength, long keepAlive, boolean nonBlocking)
-
-
Method Detail
-
maxThreads
public int maxThreads()
-
coreThreads
public int coreThreads()
-
queueLength
public int queueLength()
-
keepAlive
public long keepAlive()
-
createsNonBlockingThreads
public boolean createsNonBlockingThreads()
- Specified by:
createsNonBlockingThreadsin interfaceThreadPoolExecutorFactory<ExecutorService>
-
createExecutor
public ExecutorService createExecutor(ThreadFactory threadFactory)
- Specified by:
createExecutorin interfaceThreadPoolExecutorFactory<ExecutorService>
-
validate
public void validate()
Description copied from interface:ThreadPoolExecutorFactoryValidate parameters for the thread pool executor factory- Specified by:
validatein interfaceThreadPoolExecutorFactory<ExecutorService>
-
toString
public String toString()
-
create
public static BlockingThreadPoolExecutorFactory create(int maxThreads, int queueSize, boolean nonBlocking)
-
-