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 int
DEFAULT_KEEP_ALIVE_MILLIS
-
Constructor Summary
Constructors Constructor Description BlockingThreadPoolExecutorFactory(int maxThreads, int coreThreads, int queueLength, long keepAlive)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
coreThreads()
static BlockingThreadPoolExecutorFactory
create(int maxThreads, int queueSize)
ExecutorService
createExecutor(ThreadFactory threadFactory)
long
keepAlive()
int
maxThreads()
int
queueLength()
String
toString()
void
validate()
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
-
-
Method Detail
-
maxThreads
public int maxThreads()
-
coreThreads
public int coreThreads()
-
queueLength
public int queueLength()
-
keepAlive
public long keepAlive()
-
createExecutor
public ExecutorService createExecutor(ThreadFactory threadFactory)
- Specified by:
createExecutor
in interfaceThreadPoolExecutorFactory<ExecutorService>
-
validate
public void validate()
Description copied from interface:ThreadPoolExecutorFactory
Validate parameters for the thread pool executor factory- Specified by:
validate
in interfaceThreadPoolExecutorFactory<ExecutorService>
-
create
public static BlockingThreadPoolExecutorFactory create(int maxThreads, int queueSize)
-
-