summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replica_set_config.h
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2015-07-30 16:32:16 -0400
committerSpencer T Brody <spencer@mongodb.com>2015-07-31 13:10:44 -0400
commitcc4a522617c7eb1bc1ba72b776615d513d9ff2b2 (patch)
tree97d982ab7a28ce40fe3fea56eaf3262b8d303ad4 /src/mongo/db/repl/replica_set_config.h
parent532f2922c7d978895300ce0b34d261b2fa1cb8e8 (diff)
downloadmongo-cc4a522617c7eb1bc1ba72b776615d513d9ff2b2.tar.gz
SERVER-19524 Add configServer field to replica set configurations
Diffstat (limited to 'src/mongo/db/repl/replica_set_config.h')
-rw-r--r--src/mongo/db/repl/replica_set_config.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replica_set_config.h b/src/mongo/db/repl/replica_set_config.h
index 2db58856234..e3f405a72f7 100644
--- a/src/mongo/db/repl/replica_set_config.h
+++ b/src/mongo/db/repl/replica_set_config.h
@@ -52,6 +52,7 @@ class ReplicaSetConfig {
public:
typedef std::vector<MemberConfig>::const_iterator MemberIterator;
+ static const std::string kConfigServerFieldName;
static const std::string kVersionFieldName;
static const std::string kMajorityWriteConcernModeName;
@@ -204,6 +205,13 @@ public:
}
/**
+ * Returns true if this replica set is for use as a config server replica set.
+ */
+ bool isConfigServer() const {
+ return _configServer;
+ }
+
+ /**
* Returns a ReplicaSetTag with the given "key" and "value", or an invalid
* tag if the configuration describes no such tag.
*/
@@ -283,6 +291,7 @@ private:
ReplicaSetTagConfig _tagConfig;
StringMap<ReplicaSetTagPattern> _customWriteConcernModes;
long long _protocolVersion;
+ bool _configServer;
};