MongoDB C++ Driver  legacy-1.1.2
Public Member Functions | List of all members
mongo::ReplicaSetMonitor::SetState::Node Struct Reference

Public Member Functions

bool matches (const BSONObj &tag) const
 Checks if the given tag matches the tag attached to this node. More...
 
void update (const IsMasterReply &reply)
 Updates this Node based on information in reply. More...
 

Member Function Documentation

bool mongo::ReplicaSetMonitor::SetState::Node::matches ( const BSONObj tag) const

Checks if the given tag matches the tag attached to this node.

Example:

Tag of this node: { "dc": "nyc", "region": "na", "rack": "4" }

match: {} match: { "dc": "nyc", "rack": 4 } match: { "region": "na", "dc": "nyc" } not match: { "dc": "nyc", "rack": 2 } not match: { "dc": "sf" }

void mongo::ReplicaSetMonitor::SetState::Node::update ( const IsMasterReply reply)

Updates this Node based on information in reply.

The reply must be from this host.


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