|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gc.iotools.stream.base.ExecutorServiceFactory
public final class ExecutorServiceFactory
This class is responsible of instantiating the right executor given an ExecutionModel.
| Method Summary | |
|---|---|
static ExecutorService |
getExecutor(ExecutionModel tmodel)
|
static void |
init()
Call this method to initialize the ExecutorService that is
used in STATIC_THREAD_POOL execution mode. |
static void |
setDefaultThreadPoolExecutor(ExecutorService executor)
Sets the default ExecutorService returned when this class is invoked with ExecutionModel.STATIC_THREAD_POOL. |
static void |
shutDown()
Call this method to finalize the execution queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ExecutorService getExecutor(ExecutionModel tmodel)
public static void setDefaultThreadPoolExecutor(ExecutorService executor)
Sets the default ExecutorService returned when this class is invoked with
ExecutionModel.STATIC_THREAD_POOL.
It can also be used to initialize the class (for instance for use into a web application).
executor - ExecutorService for the STATIC_THREAD_POOL model.public static void init()
Call this method to initialize the ExecutorService that is
used in STATIC_THREAD_POOL execution mode.
ExecutionModel.STATIC_THREAD_POOL,
setDefaultThreadPoolExecutor(ExecutorService)public static void shutDown()
Call this method to finalize the execution queue.
It is mandatory when you use this library in a container, otherwise the
container doesn't terminate gracefully (for instance you can call it in a
web application context listener ContextListener.shutdown()
).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||