MongoDB C++ Driver legacy-1.1.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongo::TagSet Class Reference

A simple object for representing the list of tags requested by a $readPreference. More...

#include <dbclient_rs.h>

Public Member Functions

 TagSet ()
 Creates a TagSet that matches any nodes.
 
 TagSet (const BSONArray &tags)
 Creates a TagSet from a BSONArray of tags.
 
const BSONArraygetTagBSON () const
 Returns the BSONArray listing all tags that should be accepted.
 

Detailed Description

A simple object for representing the list of tags requested by a $readPreference.

Constructor & Destructor Documentation

◆ TagSet() [1/2]

mongo::TagSet::TagSet ( )

Creates a TagSet that matches any nodes.

Do not call during static init.

◆ TagSet() [2/2]

mongo::TagSet::TagSet ( const BSONArray tags)
inlineexplicit

Creates a TagSet from a BSONArray of tags.

Parameters
tagsthe list of tags associated with this option. This object will get a shared copy of the list. Therefore, it is important for the the given tag to live longer than the created tag set.

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