Enables to specify custom thread pools and timers to run GPars in hosted environments, such as GAE
Modifiers | Name | Description |
---|---|---|
private static PoolFactory |
poolFactory |
|
private static boolean |
poolFactoryFlag |
|
private static TimerFactory |
timerFactory |
|
private static boolean |
timerFactoryFlag |
|
private static java.util.Collection<GeneralTimer> |
timers |
Constructor and description |
---|
GParsConfig
() |
Type | Name and description |
---|---|
static PoolFactory |
getPoolFactory() |
static TimerFactory |
getTimerFactory() |
static Pool |
retrieveDefaultPool() If a pool factory has been set, it will be used to create a new thread pool. |
static GeneralTimer |
retrieveDefaultTimer(java.lang.String name, boolean daemon) If a timer factory has been set, it will be used to create a timer. |
static void |
setPoolFactory(PoolFactory pool) |
static void |
setTimerFactory(TimerFactory timerFactory) |
static void |
shutdown() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), 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() |
If a pool factory has been set, it will be used to create a new thread pool. Otherwise a new instance of ResizeablePool will be returned.
If a timer factory has been set, it will be used to create a timer. Otherwise a new instance of java.util.Timer will be created, wrapped inside a GeneralTimer instance and returned.
Copyright © 2008–2014 Václav Pech. All Rights Reserved.