diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-03-29 15:23:52 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-03-30 10:16:17 -0400 |
commit | 064c45a6a0688700d7836038db8057cda559dbd6 (patch) | |
tree | 17ac22e471cc6bb143f57d970151e5035285505e /src/mongo/db/commands/parallel_collection_scan.cpp | |
parent | 38b1b8a675993d2d12ffba5976c7344223b56640 (diff) | |
download | mongo-064c45a6a0688700d7836038db8057cda559dbd6.tar.gz |
SERVER-23407 Get rid of public fields in the Command class
Diffstat (limited to 'src/mongo/db/commands/parallel_collection_scan.cpp')
-rw-r--r-- | src/mongo/db/commands/parallel_collection_scan.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/mongo/db/commands/parallel_collection_scan.cpp b/src/mongo/db/commands/parallel_collection_scan.cpp index 9acaca45d2f..4ca7a131f60 100644 --- a/src/mongo/db/commands/parallel_collection_scan.cpp +++ b/src/mongo/db/commands/parallel_collection_scan.cpp @@ -1,32 +1,30 @@ -// parallel_collection_scan.cpp - /** -* Copyright (C) 2014 MongoDB Inc. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License, version 3, -* as published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* As a special exception, the copyright holders give permission to link the -* code of portions of this program with the OpenSSL library under certain -* conditions as described in each individual source file and distribute -* linked combinations including the program with the OpenSSL library. You -* must comply with the GNU Affero General Public License in all respects for -* all of the code used other than as permitted herein. If you modify file(s) -* with this exception, you may extend this exception to your version of the -* file(s), but you are not obligated to do so. If you do not wish to do so, -* delete this exception statement from your version. If you delete this -* exception statement from all source files in the program, then also delete -* it in the license file. -*/ + * Copyright (C) 2014-2016 MongoDB Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * As a special exception, the copyright holders give permission to link the + * code of portions of this program with the OpenSSL library under certain + * conditions as described in each individual source file and distribute + * linked combinations including the program with the OpenSSL library. You + * must comply with the GNU Affero General Public License in all respects + * for all of the code used other than as permitted herein. If you modify + * file(s) with this exception, you may extend this exception to your + * version of the file(s), but you are not obligated to do so. If you do not + * wish to do so, delete this exception statement from your version. If you + * delete this exception statement from all source files in the program, + * then also delete it in the license file. + */ #include "mongo/platform/basic.h" @@ -48,6 +46,8 @@ using std::unique_ptr; using std::string; using stdx::make_unique; +namespace { + class ParallelCollectionScanCmd : public Command { public: struct ExtentInfo { @@ -56,8 +56,6 @@ public: size_t size; }; - // ------------------------------------------------ - ParallelCollectionScanCmd() : Command("parallelCollectionScan") {} virtual bool slaveOk() const { @@ -85,7 +83,7 @@ public: int options, string& errmsg, BSONObjBuilder& result) { - NamespaceString ns(dbname, cmdObj[name].String()); + const NamespaceString ns(parseNs(dbname, cmdObj)); AutoGetCollectionForRead ctx(txn, ns.ns()); @@ -162,4 +160,6 @@ public: return true; } } parallelCollectionScanCmd; -} + +} // namespace +} // namespace mongo |