diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 00:22:50 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 10:56:02 -0400 |
commit | 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch) | |
tree | 3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/s/commands/cluster_is_master_cmd.cpp | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/s/commands/cluster_is_master_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_is_master_cmd.cpp | 78 |
1 files changed, 38 insertions, 40 deletions
diff --git a/src/mongo/s/commands/cluster_is_master_cmd.cpp b/src/mongo/s/commands/cluster_is_master_cmd.cpp index 5f926811a27..75dde8f15f9 100644 --- a/src/mongo/s/commands/cluster_is_master_cmd.cpp +++ b/src/mongo/s/commands/cluster_is_master_cmd.cpp @@ -35,52 +35,50 @@ namespace mongo { namespace { - class CmdIsMaster : public Command { - public: - CmdIsMaster() : Command("isMaster", false, "ismaster") { } +class CmdIsMaster : public Command { +public: + CmdIsMaster() : Command("isMaster", false, "ismaster") {} - virtual bool isWriteCommandForConfigServer() const { - return false; - } + virtual bool isWriteCommandForConfigServer() const { + return false; + } - virtual bool slaveOk() const { - return true; - } + virtual bool slaveOk() const { + return true; + } - virtual void help(std::stringstream& help) const { - help << "test if this is master half of a replica pair"; - } + virtual void help(std::stringstream& help) const { + help << "test if this is master half of a replica pair"; + } - virtual void addRequiredPrivileges(const std::string& dbname, - const BSONObj& cmdObj, - std::vector<Privilege>* out) { + virtual void addRequiredPrivileges(const std::string& dbname, + const BSONObj& cmdObj, + std::vector<Privilege>* out) { + // No auth required + } - // No auth required - } + virtual bool run(OperationContext* txn, + const std::string& dbname, + BSONObj& cmdObj, + int options, + std::string& errmsg, + BSONObjBuilder& result) { + result.appendBool("ismaster", true); + result.append("msg", "isdbgrid"); + result.appendNumber("maxBsonObjectSize", BSONObjMaxUserSize); + result.appendNumber("maxMessageSizeBytes", MaxMessageSizeBytes); + result.appendNumber("maxWriteBatchSize", BatchedCommandRequest::kMaxWriteBatchSize); + result.appendDate("localTime", jsTime()); - virtual bool run(OperationContext* txn, - const std::string& dbname, - BSONObj& cmdObj, - int options, - std::string& errmsg, - BSONObjBuilder& result) { + // Mongos tries to keep exactly the same version range of the server for which + // it is compiled. + result.append("maxWireVersion", maxWireVersion); + result.append("minWireVersion", minWireVersion); - result.appendBool("ismaster", true); - result.append("msg", "isdbgrid"); - result.appendNumber("maxBsonObjectSize", BSONObjMaxUserSize); - result.appendNumber("maxMessageSizeBytes", MaxMessageSizeBytes); - result.appendNumber("maxWriteBatchSize", BatchedCommandRequest::kMaxWriteBatchSize); - result.appendDate("localTime", jsTime()); + return true; + } - // Mongos tries to keep exactly the same version range of the server for which - // it is compiled. - result.append("maxWireVersion", maxWireVersion); - result.append("minWireVersion", minWireVersion); +} isMaster; - return true; - } - - } isMaster; - -} // namespace -} // namespace mongo +} // namespace +} // namespace mongo |