#include <seda_stage.hh>

Public Member Functions | |
| seda_stage (int nThread, int nTrans=16) | |
| Stage constructor. | |
| virtual | ~seda_stage (void) |
| Destructor. | |
| int | debug (void) const |
| Debug level. | |
| bool | debug (int lvlmin) const |
| Test debug level. | |
| virtual void | filter (transaction *trans)=0 |
| Stage processing method. | |
| virtual void | init_thread (void) |
| Thread initialization method. | |
| void | link_output (seda_stage &pool) |
| Link output to the next stage. | |
| void | link_alternate (seda_stage &pool) |
| Link atlernate output to the next stage. | |
| void | put_output (transaction *trans) |
| Pass transaction to the next pipeline stage. | |
| void | put_alternate (transaction *trans) |
| Pass transaction to the branch pipeline stage. | |
| tran_queue & | ref_input (void) |
| Reference the input queue. | |
| void | reject (transaction *trans, const std::string &msg) |
| Reject a transaction. | |
| void | set_debug (int lvl) |
| Set debug level. | |
| void | set_parameters (const stage_pars &p) |
| Set stage parameters. | |
| virtual void | shut (void) |
| Shut down all threads in the pool. | |
| virtual const char * | stage_name (void) const =0 |
| Stage name. | |
| void | start (void) |
| Start pipeline stage. | |
| virtual void | thread_entry (void) |
| Thread entry point. | |
Classes | |
| struct | stage_pars |
| Stage parameter structure. More... | |
The Seda Stage class provides the base for a server pipeline stage. each pipline stage uses a pool of threads to perform one stage of processing in the pipeline. The events to be processed are represented by tokens (transaction objects) placed in the input queue. After process by each stage is completed the tokens are passed on to the next stage (or alternate stage) as indicated by the output and alternate .
| sends::seda_stage::seda_stage | ( | int | nThread, | |
| int | nTrans = 16 | |||
| ) |
Stage constructor.
Construct a stage with the specified number of threads in the thread pool and the specified number of transactions in the input queue.
| nThread | Initial number of threads in pool. | |
| nTrans | Number of transation sots in input queue. |
| virtual sends::seda_stage::~seda_stage | ( | void | ) | [virtual] |
Destructor.
Stage destructor.
| int sends::seda_stage::debug | ( | void | ) | const [inline] |
Debug level.
Return debug print level for this stage.
| bool sends::seda_stage::debug | ( | int | lvlmin | ) | const [inline] |
Test debug level.
Test if debug level is greater than the specified value.
| lvlmin | Minimum debug level. |
| virtual void sends::seda_stage::filter | ( | transaction * | trans | ) | [pure virtual] |
Stage processing method.
Method to perform pipeline stage processing on the transaction passed as an argument.
| trans | Trnsaction to be processed by this method. |
Implemented in sends::authorize, sends::concentrator, sends::dump_trans, sends::fetch_stage, sends::lookup_stage, sends::parse_stage, sends::template_stage, and sends::write_stage.
| virtual void sends::seda_stage::init_thread | ( | void | ) | [virtual] |
Thread initialization method.
Method to perform initialization processing for each thread.
Reimplemented in sends::concentrator, sends::parse_stage, and sends::write_stage.
| void sends::seda_stage::link_output | ( | seda_stage & | pool | ) |
Link output to the next stage.
Link the output queue pointer to the input of the specified stage.
| pool | Next stage in the pipeline. |
| void sends::seda_stage::link_alternate | ( | seda_stage & | pool | ) |
Link atlernate output to the next stage.
Link the alternate queue pointer to the input of the specified stage.
| pool | Next stage in the pipeline. |
| void sends::seda_stage::put_output | ( | transaction * | trans | ) |
Pass transaction to the next pipeline stage.
Enter the transaction into the output queue (i.e. the input queue of the next stage in the pipeline.
| trans | Transaction to be passed to the output. |
| void sends::seda_stage::put_alternate | ( | transaction * | trans | ) |
Pass transaction to the branch pipeline stage.
Enter the transaction into the alternate queue (i.e. the input queue of the branch stage in the pipeline).
| trans | Transaction to be passed to the alternate output. |
| tran_queue & sends::seda_stage::ref_input | ( | void | ) | [inline] |
Reference the input queue.
Return a reference to the input queue for this stage.
| void sends::seda_stage::reject | ( | transaction * | trans, | |
| const std::string & | msg | |||
| ) |
Reject a transaction.
Close and release a transaction after a fatal error condition.
| trans | Pointer to transaction object. | |
| msg | Message indicating reason for the rejection. |
| void sends::seda_stage::set_debug | ( | int | lvl | ) |
Set debug level.
Set the debug print level for this stage.
| lvl | value of debug print level for this stage. |
| void sends::seda_stage::set_parameters | ( | const stage_pars & | p | ) |
Set stage parameters.
Set the parameters for this stage.
| p | parameter block. |
| virtual void sends::seda_stage::shut | ( | void | ) | [virtual] |
Shut down all threads in the pool.
Shut down all threads in the pool by doing the following:
Reimplemented in sends::parse_stage.
| virtual const char* sends::seda_stage::stage_name | ( | void | ) | const [pure virtual] |
Stage name.
Return a constant pointer to the character vector containing the name of this stage.
Implemented in sends::authorize, sends::concentrator, sends::dump_trans, sends::fetch_stage, sends::lookup_stage, sends::parse_stage, sends::template_stage, and sends::write_stage.
| void sends::seda_stage::start | ( | void | ) |
Start pipeline stage.
Perform pipeline stage startup processing including starting up the initial number of threads.
| virtual void sends::seda_stage::thread_entry | ( | void | ) | [virtual] |
Thread entry point.
Common stage code that provides synchronization and account between thread in the same stage.
Reimplemented from sends::thread_pool.
1.5.5