qpid::cluster::WriteEstimate Class Reference

Estimate the amount of data that a connection can write between sending a doOutput notice and re-receiving it. More...

#include <WriteEstimate.h>

List of all members.

Public Member Functions

 WriteEstimate (size_t initial=4096)
size_t sending (size_t buffered)
 About to send a doOutput request.
void delivered (size_t sent, size_t buffered)
 doOutput request just delivered, not yet executed.


Detailed Description

Estimate the amount of data that a connection can write between sending a doOutput notice and re-receiving it.

The goal is to avoid ever write-idling the connection by sending the next doOutput request as soon as we've processed the previous one, such that data generated by the previous request will keep the writer busy till the next one is delivered.

Definition at line 40 of file WriteEstimate.h.


Member Function Documentation

size_t qpid::cluster::WriteEstimate::sending ( size_t  buffered  ) 

About to send a doOutput request.

Update estimation state and return size for next request.

void qpid::cluster::WriteEstimate::delivered ( size_t  sent,
size_t  buffered 
)

doOutput request just delivered, not yet executed.

Update the estimate. and estimate how much data to request in the next onOutput request. 0 means don't send an onOutput request.


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

Generated on Thu Oct 16 13:38:33 2008 for Qpid by  doxygen 1.5.6