summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclient_rs.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-05-12 11:10:51 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-05-12 17:56:21 -0400
commit6d7fdcb385e481aea784de2eb515f3d27b46675c (patch)
treedfe7d87a697179f372dab7e869fd76e35e6e78bd /src/mongo/client/dbclient_rs.h
parent4486be04b169d967683ce705b6288c82cbd34947 (diff)
downloadmongo-6d7fdcb385e481aea784de2eb515f3d27b46675c.tar.gz
SERVER-18418 Remote command targeter
This change introduces a remote command targeter interface to be used as a stub to start implementing the targeting logic.
Diffstat (limited to 'src/mongo/client/dbclient_rs.h')
-rw-r--r--src/mongo/client/dbclient_rs.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/mongo/client/dbclient_rs.h b/src/mongo/client/dbclient_rs.h
index c968a428827..8b85e1664c2 100644
--- a/src/mongo/client/dbclient_rs.h
+++ b/src/mongo/client/dbclient_rs.h
@@ -306,57 +306,4 @@ namespace mongo {
};
- /**
- * A simple object for representing the list of tags requested by a $readPreference.
- */
- class TagSet {
- public:
- /**
- * Creates a TagSet that matches any nodes.
- *
- * Do not call during static init.
- */
- TagSet();
-
- /**
- * Creates a TagSet from a BSONArray of tags.
- *
- * @param tags the 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.
- */
- explicit TagSet(const BSONArray& tags) : _tags(tags) {}
-
- /**
- * Returns the BSONArray listing all tags that should be accepted.
- */
- const BSONArray& getTagBSON() const { return _tags; }
-
- bool operator==(const TagSet& other) const { return _tags == other._tags; }
-
- private:
- BSONArray _tags;
- };
-
- struct ReadPreferenceSetting {
- /**
- * @parm pref the read preference mode.
- * @param tag the tag set. Note that this object will have the
- * tag set will have this in a reset state (meaning, this
- * object's copy of tag will have the iterator in the initial
- * position).
- */
- ReadPreferenceSetting(ReadPreference pref, const TagSet& tag):
- pref(pref), tags(tag) {
- }
-
- inline bool equals(const ReadPreferenceSetting& other) const {
- return pref == other.pref && tags == other.tags;
- }
-
- BSONObj toBSON() const;
-
- const ReadPreference pref;
- TagSet tags;
- };
}