MongoDB C++ Driver legacy-1.1.2
Loading...
Searching...
No Matches
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.
 
void update (const IsMasterReply &reply)
 Updates this Node based on information in reply.
 

Member Function Documentation

◆ matches()

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" }

◆ update()

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: