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


Public Methods | |
| 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 |
| |
Template parameters that must be supplied are the number of servers in the quorum system and the number of faults tolerated.
Definition at line 39 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 158 of file StaticByzantineQuorumSystem.h. References CODEX_Quorum::Message::buffer(), CODEX_Quorum::QuorumSystem::extractKey(), CODEX_Quorum::ResponseTracker::insert(), CODEX_Quorum::QuorumSystem::m_responseTracker, CODEX_Quorum::ResponseInfo::map(), CODEX_Quorum::ReturnVector, and CODEX_Quorum::RemoteServer::sendTo(). |
|
|||||||||
|
Implements CODEX_Quorum::QuorumSystem. Definition at line 151 of file StaticByzantineQuorumSystem.h. Referenced by CODEX_Quorum::StaticByzantineQuorumSystem< N, T >::poll(). |
|
||||||||||||||||
|
Implements CODEX_Quorum::QuorumSystem. Definition at line 360 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::QuorumSystem::m_responseTracker, 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 143 of file StaticByzantineQuorumSystem.h. Referenced by CODEX_Quorum::StaticByzantineQuorumSystem< N, T >::poll(). |
|
|||||||||
|
Implements CODEX_Quorum::QuorumSystem. Definition at line 136 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 491 of file StaticByzantineQuorumSystem.h. |
|
||||||||||||||||||||
|
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 249 of file StaticByzantineQuorumSystem.h. References CODEX_Quorum::QuorumSystem::extractKey(), CODEX_Quorum::ResponseTracker::insert(), CODEX_Quorum::QuorumSystem::m_responseTracker, CODEX_Quorum::ResponseInfo::map(), CODEX_Quorum::MessageVector, CODEX_Quorum::ReturnVector, and CODEX_Quorum::RemoteServer::sendTo(). |
1.2.18