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_flush_router_config_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_flush_router_config_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_flush_router_config_cmd.cpp | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/src/mongo/s/commands/cluster_flush_router_config_cmd.cpp b/src/mongo/s/commands/cluster_flush_router_config_cmd.cpp index 19477622b64..dbb52870602 100644 --- a/src/mongo/s/commands/cluster_flush_router_config_cmd.cpp +++ b/src/mongo/s/commands/cluster_flush_router_config_cmd.cpp @@ -36,48 +36,47 @@ namespace mongo { namespace { - class FlushRouterConfigCmd : public Command { - public: - FlushRouterConfigCmd() : Command("flushRouterConfig", false, "flushrouterconfig") { } +class FlushRouterConfigCmd : public Command { +public: + FlushRouterConfigCmd() : Command("flushRouterConfig", false, "flushrouterconfig") {} - virtual bool slaveOk() const { - return true; - } + virtual bool slaveOk() const { + return true; + } - virtual bool adminOnly() const { - return true; - } + virtual bool adminOnly() const { + return true; + } - virtual bool isWriteCommandForConfigServer() const { - return false; - } + virtual bool isWriteCommandForConfigServer() const { + return false; + } - virtual void help(std::stringstream& help) const { - help << "flush all router config"; - } + virtual void help(std::stringstream& help) const { + help << "flush all router config"; + } - virtual void addRequiredPrivileges(const std::string& dbname, - const BSONObj& cmdObj, - std::vector<Privilege>* out) { - ActionSet actions; - actions.addAction(ActionType::flushRouterConfig); - out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); - } + virtual void addRequiredPrivileges(const std::string& dbname, + const BSONObj& cmdObj, + std::vector<Privilege>* out) { + ActionSet actions; + actions.addAction(ActionType::flushRouterConfig); + out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); + } - virtual bool run(OperationContext* txn, - const std::string& dbname, - BSONObj& cmdObj, - int options, - std::string& errmsg, - BSONObjBuilder& result) { + virtual bool run(OperationContext* txn, + const std::string& dbname, + BSONObj& cmdObj, + int options, + std::string& errmsg, + BSONObjBuilder& result) { + grid.catalogCache()->invalidateAll(); - grid.catalogCache()->invalidateAll(); + result.appendBool("flushed", true); + return true; + } - result.appendBool("flushed", true); - return true; - } +} flushRouterConfigCmd; - } flushRouterConfigCmd; - -} // namespace -} // namespace mongo +} // namespace +} // namespace mongo |