Package org.apache.catalina.tribes.util
Class ExecutorFactory
- java.lang.Object
-
- org.apache.catalina.tribes.util.ExecutorFactory
-
public class ExecutorFactory extends java.lang.ObjectFactory for creating thread pool executors for Tribes clustering.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringManagersmString manager for this class.
-
Constructor Summary
Constructors Constructor Description ExecutorFactory()Default constructor for ExecutorFactory.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.concurrent.ExecutorServicenewThreadPool(int minThreads, int maxThreads, long maxIdleTime, java.util.concurrent.TimeUnit unit)Creates a new thread pool executor with the specified parameters.static java.util.concurrent.ExecutorServicenewThreadPool(int minThreads, int maxThreads, long maxIdleTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.ThreadFactory threadFactory)Creates a new thread pool executor with the specified parameters and thread factory.
-
-
-
Field Detail
-
sm
protected static final StringManager sm
String manager for this class.
-
-
Method Detail
-
newThreadPool
public static java.util.concurrent.ExecutorService newThreadPool(int minThreads, int maxThreads, long maxIdleTime, java.util.concurrent.TimeUnit unit)Creates a new thread pool executor with the specified parameters.- Parameters:
minThreads- The minimum number of threadsmaxThreads- The maximum number of threadsmaxIdleTime- The maximum idle time for threadsunit- The time unit for maxIdleTime- Returns:
- the new thread pool executor
-
newThreadPool
public static java.util.concurrent.ExecutorService newThreadPool(int minThreads, int maxThreads, long maxIdleTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.ThreadFactory threadFactory)Creates a new thread pool executor with the specified parameters and thread factory.- Parameters:
minThreads- The minimum number of threadsmaxThreads- The maximum number of threadsmaxIdleTime- The maximum idle time for threadsunit- The time unit for maxIdleTimethreadFactory- The thread factory to use- Returns:
- the new thread pool executor
-
-