#include <concentrator.hh>

Public Member Functions | |
| concentrator (int nThread, int nTrans) | |
| Concentrator pool constructor. | |
| virtual | ~concentrator (void) |
| void | add_transaction (transaction *trans, double timeout) |
| Add transaction to wait list. | |
| void | filter (transaction *trans) |
| Transaction filter for this stage. | |
| void | init_thread (void) |
| Thread initialization. | |
| const char * | stage_name (void) const |
| Stage name. | |
Classes | |
| struct | hold |
The concentrator class handles multiple transaction waits. A wait_data() command is issued on each transaction entered into the input queue. The transaction is passed to the output queue if data arrives or is release if the wait request times out. The concentrator stage fits between the authentication srtage and the command parser stage. The preliminary implementation has one thread per waiting transaction. In the future, I intend to modify it to concentrate multiple waits into a singlethread using the select mechanism.
| sends::concentrator::concentrator | ( | int | nThread, | |
| int | nTrans | |||
| ) |
Concentrator pool constructor.
Construct a concentrator object. The arguments indicate the number of threads in the pool and the number of input transactions that may be queue simultaneously (note that the pipline gets indigestion only after more than (nTrans + nThread) trasactions need to execute in this stage.
| nThread | Number of threads to run simultaneously in the pool. | |
| nTrans | Number of transactions that may be queued. |
| virtual sends::concentrator::~concentrator | ( | void | ) | [virtual] |
Concentrator destructor.
| void sends::concentrator::add_transaction | ( | transaction * | trans, | |
| double | timeout | |||
| ) |
Add transaction to wait list.
Add a transaction to the list of sockets waiting for input.
| trans | Pointer to transaction object. |
| void sends::concentrator::filter | ( | transaction * | trans | ) | [virtual] |
Transaction filter for this stage.
The initial implementation of the concentrator filter waits on a single input transaction.
| trans | Pointer to the current transaction |
Implements sends::seda_stage.
| void sends::concentrator::init_thread | ( | void | ) | [virtual] |
Thread initialization.
Initialize signal handling for this thread. The SIGPIPE signal should leak through the select...
Reimplemented from sends::seda_stage.
| const char* sends::concentrator::stage_name | ( | void | ) | const [virtual] |
Stage name.
Return a constant pointer to a null-terminated character vector containing the name of the stage.
Implements sends::seda_stage.
1.5.5