Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_Quorum::ResponseInfo Class Reference

This class holds response-tracking information for a single request. More...

#include <ResponseInfo.h>

Collaboration diagram for CODEX_Quorum::ResponseInfo:

Collaboration graph
[legend]
List of all members.

Public Types

typedef map< unsigned int,
bool > 
ServerMap
 Mapping from a server ID to the callback result.

Public Member Functions

 ResponseInfo (ResponseCallback *cb)
 Constructor.
virtual ~ResponseInfo ()
 Virtual destructor.
void add (unsigned int server, Message *msg)
 This method checks an incoming response using the supplied callback, adding the server to the internal list of respondents.
const ServerMapmap () const
 The internal map of responses.
unsigned int failures () const
 The number of failed responses received.
unsigned int successes () const
 The number of successful responses received.
void fail ()
 Trigger the callback's failure hook.

Detailed Description

This class holds response-tracking information for a single request.

Definition at line 33 of file ResponseInfo.h.


Constructor & Destructor Documentation

CODEX_Quorum::ResponseInfo::ResponseInfo ResponseCallback cb  )  [inline]
 

Constructor.

Parameters:
cb A callback functional that is called for each message from a server that has not yet responded. This object takes control of the memory.

Definition at line 45 of file ResponseInfo.h.


Member Function Documentation

void ResponseInfo::add unsigned int  server,
Message msg
 

This method checks an incoming response using the supplied callback, adding the server to the internal list of respondents.

If the callback returns false, the failure count is incremented.

Parameters:
server The ID of the server sending the message.
msg The message received.

Definition at line 28 of file ResponseInfo.cc.


The documentation for this class was generated from the following files:
Generated on Fri May 6 17:42:32 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1