public final class ResizeablePool extends DefaultPool
Modifier and Type | Field and Description |
---|---|
private static long |
KEEP_ALIVE_TIME |
POOL_SIZE_MUST_BE_A_POSITIVE_NUMBER, UNCAUGHT_EXCEPTION_OCCURRED_IN_GPARS_POOL
Constructor and Description |
---|
ResizeablePool(boolean daemon)
Creates the pool with default number of threads.
|
ResizeablePool(boolean daemon,
int poolSize)
Creates the pool with specified number of threads.
|
Modifier and Type | Method and Description |
---|---|
private static java.util.concurrent.ThreadPoolExecutor |
createResizeablePool(boolean daemon,
int poolSize)
Creates a fixed-thread pool of given size.
|
createThreadName, execute, getExecutorService, getPoolSize, resetDefaultSize, resize, shutdown
private static final long KEEP_ALIVE_TIME
public ResizeablePool(boolean daemon)
daemon
- Sets the daemon flag of threads in the pool.public ResizeablePool(boolean daemon, int poolSize)
daemon
- Sets the daemon flag of threads in the pool.poolSize
- The required size of the poolprivate static java.util.concurrent.ThreadPoolExecutor createResizeablePool(boolean daemon, int poolSize)
daemon
- Sets the daemon flag of threads in the pool.poolSize
- The required pool size @return The created thread pool