alma::ACS::jbaci::BACIDispatcher Class Reference

Collaboration diagram for alma::ACS::jbaci::BACIDispatcher:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

BACI dispatcher (thread pool)

Author:
Matej Sekoranja
Version:
$id$

Constructor & Destructor Documentation

alma::ACS::jbaci::BACIDispatcher::BACIDispatcher ( ThreadFactory  threadFactory  )  [inline]

Constructor.

Parameters:
threadFactory thread factory to be used to create thread, if null no factory is being used

References MAX_REQUESTS, POOL_THREADS, and threadPool.


Member Function Documentation

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.

Parameters:
action action to execute.
Returns:
true on success.

References threadPool.

void alma::ACS::jbaci::BACIDispatcher::shutdown (  )  [inline]

Shutdown dispatcher.

References threadPool.

Referenced by alma::ACS::jbaci::BACIFramework::shutdown().


Member Data Documentation

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().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2