Gaia
CyclopsMaster Class Reference
Inheritance diagram for CyclopsMaster:
YamlRPCServer

Public Member Functions

void setupClients (const QString &configFilename)
 
- Public Member Functions inherited from YamlRPCServer
 YamlRPCServer (quint16 port, YamlProxy *proxy)
 
void incomingConnection (int socket)
 
gaia2::yaml::Mapping processRequest (QTcpSocket *socket)
 
int numberConnectedClients () const
 

Protected Slots

void replyFromSlave (int id, bool error)
 
- Protected Slots inherited from YamlRPCServer
void discardClient ()
 

Protected Member Functions

virtual void readClient ()
 
void sendReadyReply (QTcpSocket *client)
 Send a reply to the client if all slaves have replied.
 
void sendReplyToClient (QTcpSocket *client, const gaia2::yaml::Mapping &reply)
 Sends the specified message to client.
 
gaia2::yaml::Mapping split (const gaia2::yaml::Mapping &query, int idx, int total, PendingRequest &preq)
 
gaia2::yaml::Mapping reduce (const PendingRequest &results)
 
void distributeClientRequest (QTcpSocket *client, const gaia2::yaml::Mapping &q)
 
int sendSlaveRequest (const QPair< QHostAddress, int > &slave, const gaia2::yaml::Mapping &request)
 
void setup (const QString &filename)
 

Protected Attributes

QList< QPair< QHostAddress, int > > _slaves
 Maintains a list of connected slaves, as pairs (IP, port).
 
QMap< int, QTcpSocket * > _slaveToClient
 Maintains a list of QHttp connection ids to client socket that originated the spawning of this QHttp.
 
QMap< int, QBuffer * > _slaveReplies
 Maintains a list of QHttp connections incoming data.
 
QMap< QTcpSocket *, PendingRequest_pendingRequests
 Maintains the list of slave replies already obtained for a client query. More...
 
- Protected Attributes inherited from YamlRPCServer
YamlProxy_proxy
 
QDateTime _startedOn
 
QMap< QTcpSocket *, QByteArray > _socketIDs
 

Additional Inherited Members

- Signals inherited from YamlRPCServer
void quit ()
 

Member Data Documentation

QMap<QTcpSocket*, PendingRequest> CyclopsMaster::_pendingRequests
protected

Maintains the list of slave replies already obtained for a client query.

When this list grows up to a size that is equal to the number of slaves, we should merge the results and send the result back to the client.


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