sends::write_stage Class Reference
[Sends Pipeline Stage Classes]

Data reply SEDA stage. More...

#include <write_stage.hh>

Inheritance diagram for sends::write_stage:

sends::seda_stage sends::thread_pool

List of all members.

Public Member Functions

 write_stage (int nThread, int nTrans)
 Stage template constructor.
virtual ~write_stage (void)
void filter (transaction *trans)
 Transaction filter for this stage.
void init_thread (void)
 Thread initialization.
const char * stage_name (void) const
 Stage name.
void write_status (transaction *trans)
void write_data (transaction *trans)
void write_server_status (transaction *trans)
void write_channel_list (transaction *trans)


Detailed Description

Data reply SEDA stage.

The write_stage class provides a minimal template for a SEDA stage thread pool. It is based on the seda_stage class and provides a stage with no filter processing. The constructor, destructor and filter methods are implemented. The filter method immediately passes the transactions to its output or alternate queue (the input queue of the next stage in the pipeline. In the case of the write stage, the standard output is the parse stage (execute another command) and the alternate output is the fetch stage (fetch more data for this transaction).

Author:
J. Zweizig
Version:
1.0; Last modified December 28, 2007

Constructor & Destructor Documentation

sends::write_stage::write_stage ( int  nThread,
int  nTrans 
)

Stage template constructor.

Construct a write_stage 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) transactions need to execute in this stage.

Parameters:
nThread Number of threads to run simultaneously in the pool.
nTrans Number of transactions that may be queued.

virtual sends::write_stage::~write_stage ( void   )  [virtual]

Stage template destructor is null by default. It is mostly useful to remove resources allocated by the stages.


Member Function Documentation

void sends::write_stage::filter ( transaction trans  )  [virtual]

Transaction filter for this stage.

The filter method performs the transaction processing for a single stage. By default this is a null filter that passes the transaction on to the next

Parameters:
trans Pointer to the current transaction

Implements sends::seda_stage.

void sends::write_stage::init_thread ( void   )  [virtual]

Thread initialization.

Set up the signal handling for this thread.

Reimplemented from sends::seda_stage.

const char* sends::write_stage::stage_name ( void   )  const [virtual]

Stage name.

Return a constant pointer to a null-terminated character vector containing the name of the stage.

Returns:
Constant pointer to the stage name string.

Implements sends::seda_stage.


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

Generated on Tue Jun 10 12:18:12 2008 for SENDS by  doxygen 1.5.5