MongoDB  2.7.0
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. More...
 
 TagSet (const BSONArray &tags)
 Creates a TagSet from a BSONArray of tags. More...
 
const BSONArraygetTagBSON () const
 Returns the BSONArray listing all tags that should be accepted.
 
bool operator== (const TagSet &other) const
 

Detailed Description

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

Constructor & Destructor Documentation

mongo::TagSet::TagSet ( )

Creates a TagSet that matches any nodes.

Do not call during static init.

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 files: