public interface Pool
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
POOL_SIZE_MUST_BE_A_POSITIVE_NUMBER |
static java.lang.String |
UNCAUGHT_EXCEPTION_OCCURRED_IN_GPARS_POOL |
Modifier and Type | Method and Description |
---|---|
void |
execute(java.lang.Runnable task)
schedules a new task for processing with the pool
|
int |
getPoolSize()
Retrieves the current thread pool size
|
void |
resetDefaultSize()
Sets the pool size to the default
|
void |
resize(int poolSize)
Resizes the thread pool to the specified value
|
void |
shutdown()
Gently stops the pool
|
static final java.lang.String POOL_SIZE_MUST_BE_A_POSITIVE_NUMBER
static final java.lang.String UNCAUGHT_EXCEPTION_OCCURRED_IN_GPARS_POOL
void resize(int poolSize)
poolSize
- The new pool sizevoid resetDefaultSize()
int getPoolSize()
void execute(java.lang.Runnable task)
task
- The task to schedulevoid shutdown()