@groovy.transform.AutoFinal @groovy.transform.CompileStatic class LoggingPoolFactory extends java.lang.Object implements groovyx.gpars.util.PoolFactory
A pool factory that logs error instead of printing them to standard err as is the default in GPars
Modifiers | Name | Description |
---|---|---|
class |
LoggingPoolFactory.1 |
|
class |
LoggingPoolFactory.2 |
Modifiers | Name | Description |
---|---|---|
private static long |
KEEP_ALIVE_TIME |
|
static org.slf4j.Logger |
LOG |
|
static java.lang.reflect.Method |
createThreadNameMethod |
Constructor and description |
---|
LoggingPoolFactory() |
Type Params | Return Type | Name and description |
---|---|---|
|
groovyx.gpars.scheduler.Pool |
createPool() |
|
groovyx.gpars.scheduler.Pool |
createPool(boolean daemon) |
|
groovyx.gpars.scheduler.Pool |
createPool(int numberOfThreads) |
|
groovyx.gpars.scheduler.Pool |
createPool(boolean daemon, int numberOfThreads) |
|
private static java.util.concurrent.ThreadPoolExecutor |
createResizeablePool(boolean daemon, int poolSize) Creates a fixed-thread pool of given size. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates a fixed-thread pool of given size. Each thread will have the uncaught exception handler set to print the unhandled exception to standard error output.
daemon
- Sets the daemon flag of threads in the pool.poolSize
- The required pool size