Encapsulates replication state. More...
#include <BerkeleyDbFilesystem.h>

Public Member Functions | |
| ReplicationInfo () | |
| Constructor. More... | |
| void | wait_for_election () |
| Waits for master election to finish. More... | |
| void | finish_election () |
| Finish master election. More... | |
| bool | election_finished () |
| Check if master election is finished. More... | |
Public Attributes | |
| bool | do_replication |
| bool | is_master {} |
| int | master_eid {-1} |
| uint32_t | num_replicas {} |
| String | localhost |
| std::unordered_map< int, String > | replica_map |
Private Attributes | |
| std::mutex | m_election_mutex |
| Mutex for serializing access to m_election_done More... | |
| std::condition_variable | m_election_cond |
| Condition variable for signaling change to m_election_done. More... | |
| bool | m_election_done {} |
| Indicates if master election has finished. More... | |
Encapsulates replication state.
Definition at line 88 of file BerkeleyDbFilesystem.h.
|
inline |
Constructor.
Definition at line 91 of file BerkeleyDbFilesystem.h.
|
inline |
Check if master election is finished.
Definition at line 111 of file BerkeleyDbFilesystem.h.
|
inline |
Finish master election.
Definition at line 100 of file BerkeleyDbFilesystem.h.
|
inline |
Waits for master election to finish.
Definition at line 94 of file BerkeleyDbFilesystem.h.
| bool Hyperspace::ReplicationInfo::do_replication |
Definition at line 116 of file BerkeleyDbFilesystem.h.
| bool Hyperspace::ReplicationInfo::is_master {} |
Definition at line 117 of file BerkeleyDbFilesystem.h.
| String Hyperspace::ReplicationInfo::localhost |
Definition at line 120 of file BerkeleyDbFilesystem.h.
|
private |
Condition variable for signaling change to m_election_done.
Definition at line 129 of file BerkeleyDbFilesystem.h.
|
private |
Indicates if master election has finished.
Definition at line 132 of file BerkeleyDbFilesystem.h.
|
private |
Mutex for serializing access to m_election_done
Definition at line 126 of file BerkeleyDbFilesystem.h.
| int Hyperspace::ReplicationInfo::master_eid {-1} |
Definition at line 118 of file BerkeleyDbFilesystem.h.
| uint32_t Hyperspace::ReplicationInfo::num_replicas {} |
Definition at line 119 of file BerkeleyDbFilesystem.h.
| std::unordered_map<int, String> Hyperspace::ReplicationInfo::replica_map |
Definition at line 121 of file BerkeleyDbFilesystem.h.
1.8.8