summaryrefslogtreecommitdiff
path: root/src/mongo/db/mongod_options.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/mongod_options.h')
-rw-r--r--src/mongo/db/mongod_options.h76
1 files changed, 37 insertions, 39 deletions
diff --git a/src/mongo/db/mongod_options.h b/src/mongo/db/mongod_options.h
index 27dc9af10ab..942ecd27e63 100644
--- a/src/mongo/db/mongod_options.h
+++ b/src/mongo/db/mongod_options.h
@@ -37,55 +37,53 @@
namespace mongo {
- namespace optionenvironment {
- class OptionSection;
- class Environment;
- } // namespace optionenvironment
+namespace optionenvironment {
+class OptionSection;
+class Environment;
+} // namespace optionenvironment
- namespace moe = mongo::optionenvironment;
+namespace moe = mongo::optionenvironment;
- struct MongodGlobalParams {
- bool scriptingEnabled; // --noscripting
+struct MongodGlobalParams {
+ bool scriptingEnabled; // --noscripting
- MongodGlobalParams() :
- scriptingEnabled(true)
- { }
- };
+ MongodGlobalParams() : scriptingEnabled(true) {}
+};
- extern MongodGlobalParams mongodGlobalParams;
+extern MongodGlobalParams mongodGlobalParams;
- Status addMongodOptions(moe::OptionSection* options);
+Status addMongodOptions(moe::OptionSection* options);
- void printMongodHelp(const moe::OptionSection& options);
+void printMongodHelp(const moe::OptionSection& options);
- /**
- * Handle options that should come before validation, such as "help".
- *
- * Returns false if an option was found that implies we should prematurely exit with success.
- */
- bool handlePreValidationMongodOptions(const moe::Environment& params,
- const std::vector<std::string>& args);
+/**
+ * Handle options that should come before validation, such as "help".
+ *
+ * Returns false if an option was found that implies we should prematurely exit with success.
+ */
+bool handlePreValidationMongodOptions(const moe::Environment& params,
+ const std::vector<std::string>& args);
- /**
- * Handle custom validation of mongod options that can not currently be done by using
- * Constraints in the Environment. See the "validate" function in the Environment class for
- * more details.
- */
- Status validateMongodOptions(const moe::Environment& params);
+/**
+ * Handle custom validation of mongod options that can not currently be done by using
+ * Constraints in the Environment. See the "validate" function in the Environment class for
+ * more details.
+ */
+Status validateMongodOptions(const moe::Environment& params);
- /**
- * Canonicalize mongod options for the given environment.
- *
- * For example, the options "dur", "nodur", "journal", "nojournal", and
- * "storage.journaling.enabled" should all be merged into "storage.journaling.enabled".
- */
- Status canonicalizeMongodOptions(moe::Environment* params);
+/**
+ * Canonicalize mongod options for the given environment.
+ *
+ * For example, the options "dur", "nodur", "journal", "nojournal", and
+ * "storage.journaling.enabled" should all be merged into "storage.journaling.enabled".
+ */
+Status canonicalizeMongodOptions(moe::Environment* params);
- // Must be called after "storeMongodOptions"
- StatusWith<repl::ReplSettings> parseMongodReplicationOptions(const moe::Environment& params);
+// Must be called after "storeMongodOptions"
+StatusWith<repl::ReplSettings> parseMongodReplicationOptions(const moe::Environment& params);
- Status storeMongodOptions(const moe::Environment& params, const std::vector<std::string>& args);
+Status storeMongodOptions(const moe::Environment& params, const std::vector<std::string>& args);
- void setGlobalReplSettings(const repl::ReplSettings& settings);
- const repl::ReplSettings& getGlobalReplSettings();
+void setGlobalReplSettings(const repl::ReplSettings& settings);
+const repl::ReplSettings& getGlobalReplSettings();
}