
Public Member Functions | |
| BACIDispatcher (ThreadFactory threadFactory) | |
| boolean | execute (PrioritizedRunnable action) |
| void | shutdown () |
Private Attributes | |
| ThreadPoolExecutor | threadPool |
Static Private Attributes | |
| static final int | MAX_REQUESTS = 100 |
| static final int | POOL_THREADS = 10 |
BACI dispatcher (thread pool)
| alma::ACS::jbaci::BACIDispatcher::BACIDispatcher | ( | ThreadFactory | threadFactory | ) | [inline] |
Constructor.
| threadFactory | thread factory to be used to create thread, if null no factory is being used |
References MAX_REQUESTS, POOL_THREADS, and threadPool.
| boolean alma::ACS::jbaci::BACIDispatcher::execute | ( | PrioritizedRunnable | action | ) | [inline] |
Execute action. If the maximum pool size or queue size is bounded, then it is possible for incoming execute requests to block. BACIDispatcher uses its own blocking policy: creating a new thread, which will call blocking execute.
| action | action to execute. |
true on success. References threadPool.
| void alma::ACS::jbaci::BACIDispatcher::shutdown | ( | ) | [inline] |
Shutdown dispatcher.
References threadPool.
Referenced by alma::ACS::jbaci::BACIFramework::shutdown().
final int alma::ACS::jbaci::BACIDispatcher::MAX_REQUESTS = 100 [static, private] |
Number of threads in thread pool.
Referenced by BACIDispatcher().
final int alma::ACS::jbaci::BACIDispatcher::POOL_THREADS = 10 [static, private] |
Number of requests ( in thread pool (guarantees order of execution).
Referenced by BACIDispatcher().
ThreadPoolExecutor alma::ACS::jbaci::BACIDispatcher::threadPool [private] |
Thread pool.
Referenced by BACIDispatcher(), execute(), and shutdown().
1.6.2