sends::concentrator Class Reference

SEDA wait concentrator stage class. More...

#include <concentrator.hh>

Inheritance diagram for sends::concentrator:

sends::seda_stage sends::thread_pool

List of all members.

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


Detailed Description

SEDA wait concentrator stage class.

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.

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

Constructor & Destructor Documentation

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.

Parameters:
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.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

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