0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
Hyperspace::ReplicationInfo Class Reference

Encapsulates replication state. More...

#include <BerkeleyDbFilesystem.h>

Collaboration diagram for Hyperspace::ReplicationInfo:
Collaboration graph
[legend]

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, Stringreplica_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...
 

Detailed Description

Encapsulates replication state.

Definition at line 88 of file BerkeleyDbFilesystem.h.

Constructor & Destructor Documentation

Hyperspace::ReplicationInfo::ReplicationInfo ( )
inline

Constructor.

Definition at line 91 of file BerkeleyDbFilesystem.h.

Member Function Documentation

bool Hyperspace::ReplicationInfo::election_finished ( )
inline

Check if master election is finished.

Returns
true if master election has finished, false otherwise

Definition at line 111 of file BerkeleyDbFilesystem.h.

void Hyperspace::ReplicationInfo::finish_election ( )
inline

Finish master election.

Definition at line 100 of file BerkeleyDbFilesystem.h.

void Hyperspace::ReplicationInfo::wait_for_election ( )
inline

Waits for master election to finish.

Definition at line 94 of file BerkeleyDbFilesystem.h.

Member Data Documentation

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.

std::condition_variable Hyperspace::ReplicationInfo::m_election_cond
private

Condition variable for signaling change to m_election_done.

Definition at line 129 of file BerkeleyDbFilesystem.h.

bool Hyperspace::ReplicationInfo::m_election_done {}
private

Indicates if master election has finished.

Definition at line 132 of file BerkeleyDbFilesystem.h.

std::mutex Hyperspace::ReplicationInfo::m_election_mutex
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.


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