#include <StaticByzantineQuorumSystem.h>
Inheritance diagram for CODEX_Quorum::StaticByzantineQuorumSystem< N, T >:


Public Member Functions | |
| StaticByzantineQuorumSystem (ResponseTracker *aRT) | |
| Constructor. | |
| virtual | ~StaticByzantineQuorumSystem () |
| Destructor. This clears out any remaining message buffers. | |
| unsigned int | quorumSystemSize () |
| unsigned int | quorumSize () |
| unsigned int | faultsTolerated () |
| bool | broadcastMessage (const Message &msg, ReturnVector &rets, ResponseCallback *cb) |
| Send a message to all the servers in a QuorumSystem. | |
| bool | unicastMessage (const MessageVector &msgs, ReturnVector &rets, ResponseCallback *cb=0) |
| Send a server-specific message to each server in a QuorumSystem. | |
| void | poll (MessageDispatcher &requestDispatcher, QuorumDispatcher &responseDispatcher) |
| void | setServer (unsigned int i, RemoteServer *server) |
| Set a pointer to a RemoteServer for server slot i. | |
| const RemoteServer * | server (unsigned int i) const |
| A pointer to the RemoteServer for server slot i. | |
| virtual unsigned char * | extractKey (const unsigned char *data) |
| Forwards a request to ResponseTracker::extractKey(). | |
| virtual bool | keyRegistered (const unsigned char *key) |
| Determines whether a key is registered with the ResponseTracker. | |
Protected Attributes | |
| ResponseTracker * | m_responseTracker |
| This is used to match responses to their associated requests. | |
Template parameters that must be supplied are the number of servers in the quorum system and the number of faults tolerated.
Definition at line 42 of file StaticByzantineQuorumSystem.h.
|
||||||||||||||||||||
|
Send a message to all the servers in a QuorumSystem.
This method only sends messages. It expects the vector
The message sent is also registered with the ResponseTracker, since broadcasts are generally requests awaiting replies. This can be prevented by passing a All messages should have identifying information for the initiator of the request and a unique ID for the request.
Implements CODEX_Quorum::QuorumSystem. Definition at line 161 of file StaticByzantineQuorumSystem.h. References CODEX_Quorum::QuorumSystem::extractKey(), CODEX_Quorum::ResponseTracker::insert(), CODEX_Quorum::ResponseInfo::map(), and CODEX_Quorum::RemoteServer::sendTo(). |
|
|||||||||
|
Implements CODEX_Quorum::QuorumSystem. Definition at line 154 of file StaticByzantineQuorumSystem.h. Referenced by CODEX_Quorum::StaticByzantineQuorumSystem< N, T >::poll(). |
|
|
Determines whether a key is registered with the ResponseTracker.
Definition at line 207 of file QuorumSystem.h. References CODEX_Quorum::QuorumSystem::m_responseTracker. Referenced by CODEX_Server::UnicastRequestHandler::handler(), and CODEX_Server::BroadcastRequestHandler::handler(). |
|
||||||||||||||||
|
Implements CODEX_Quorum::QuorumSystem. Definition at line 363 of file StaticByzantineQuorumSystem.h. References CODEX_Quorum::Message::buffer(), CODEX_Quorum::ResponseTracker::check(), CODEX_Quorum::QuorumSystem::extractKey(), CODEX_Quorum::ResponseInfo::failures(), CODEX_Quorum::StaticByzantineQuorumSystem< N, T >::faultsTolerated(), CODEX_Quorum::RemoteServer::isset_fd(), CODEX_Quorum::Message::length(), CODEX_Quorum::StaticByzantineQuorumSystem< N, T >::quorumSize(), CODEX_Quorum::RemoteServer::receiveFrom(), CODEX_Quorum::ResponseTracker::remove(), CODEX_Quorum::RemoteServer::set_fd(), and CODEX_Quorum::ResponseInfo::successes(). |
|
|||||||||
|
Implements CODEX_Quorum::QuorumSystem. Definition at line 146 of file StaticByzantineQuorumSystem.h. Referenced by CODEX_Quorum::StaticByzantineQuorumSystem< N, T >::poll(). |
|
|||||||||
|
Implements CODEX_Quorum::QuorumSystem. Definition at line 139 of file StaticByzantineQuorumSystem.h. |
|
||||||||||||||||
|
Set a pointer to a RemoteServer for server slot i.
The StaticByzantineQuorumSystem takes ownership of the memory. Cleanup can be avoided by setting the server to Definition at line 494 of file StaticByzantineQuorumSystem.h. References CODEX_Quorum::StaticByzantineQuorumSystem< N, T >::server(). Referenced by CODEX_Server::ServerState::addQuorumServer(). |
|
||||||||||||||||||||
|
Send a server-specific message to each server in a QuorumSystem.
This method only sends messages. It expects the vector By default, the message sent is not registered with the ResponseTracker, since unicasts are not generally requests awaiting replies. This behavior can be changed by passing a callback object. It is advisable in cases where the sender is part of the quorum system for there to be distinct outgoing and incoming server identifiers. For example, the first bit of the first byte might flag whether this is a request being sent by the server or a response to a request from the server. This prevents the request from being treated as a response to itself in ResponseTracker.
Implements CODEX_Quorum::QuorumSystem. Definition at line 252 of file StaticByzantineQuorumSystem.h. References CODEX_Quorum::QuorumSystem::extractKey(), CODEX_Quorum::ResponseTracker::insert(), CODEX_Quorum::ResponseInfo::map(), and CODEX_Quorum::RemoteServer::sendTo(). |
1.4.1