diff options
author | Andy Schwerin <schwerin@10gen.com> | 2013-02-13 14:28:31 -0500 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2013-02-15 11:33:38 -0500 |
commit | 31a2028d80848e1770bf91ced08bae9ca7139d58 (patch) | |
tree | 8dc81e94a7685c2c0d3931d7dc8026928729e94d /src/mongo/db/server_parameters.cpp | |
parent | a09abdaa6c93c50d3b58ee97597baff96e02475b (diff) | |
download | mongo-31a2028d80848e1770bf91ced08bae9ca7139d58.tar.gz |
SERVER-8087 Make it possible to declare startup-only and runtime-only server parameters.
Diffstat (limited to 'src/mongo/db/server_parameters.cpp')
-rw-r--r-- | src/mongo/db/server_parameters.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mongo/db/server_parameters.cpp b/src/mongo/db/server_parameters.cpp index 02f0d1371d5..abf6858e1e1 100644 --- a/src/mongo/db/server_parameters.cpp +++ b/src/mongo/db/server_parameters.cpp @@ -26,8 +26,21 @@ namespace mongo { ServerParameterSet* GLOBAL = NULL; } + ServerParameter::ServerParameter( ServerParameterSet* sps, const std::string& name, + bool allowedToChangeAtStartup, bool allowedToChangeAtRuntime ) + : _name( name ), + _allowedToChangeAtStartup( allowedToChangeAtStartup ), + _allowedToChangeAtRuntime( allowedToChangeAtRuntime ) { + + if ( sps ) { + sps->add( this ); + } + } + ServerParameter::ServerParameter( ServerParameterSet* sps, const std::string& name ) - : _name( name ) { + : _name( name ), + _allowedToChangeAtStartup( true ), + _allowedToChangeAtRuntime( true ) { if ( sps ) { sps->add( this ); |