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/client/scc_fast_query_handler.h | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/s/client/scc_fast_query_handler.h')
-rw-r--r-- | src/mongo/s/client/scc_fast_query_handler.h | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/src/mongo/s/client/scc_fast_query_handler.h b/src/mongo/s/client/scc_fast_query_handler.h index bc942556389..c2079e717ff 100644 --- a/src/mongo/s/client/scc_fast_query_handler.h +++ b/src/mongo/s/client/scc_fast_query_handler.h @@ -33,44 +33,40 @@ namespace mongo { - /** - * Query handler that plugs in to a SyncClusterConnection and allows query on fastest host - * (if enabled). - * - * Glue code which shields the MultiHostQuery and server parameters from the separate client - * module which knows about neither. - * - * There is a *single* SCCFastQueryHandler for every SCC. Each SCCFastQueryHandler contains - * its own thread pool (lazily initialized) so that at maximum there is a thread-per-SCC-host - * and this thread may have an open connection to the host until it times out. - * If using the "fastestConfigReads" options, clients must be ready for the additional thread - * and connection load when configs are slow. - */ - class SCCFastQueryHandler : public SyncClusterConnection::QueryHandler { - public: - - SCCFastQueryHandler(); - - virtual ~SCCFastQueryHandler() { - } - - virtual bool canHandleQuery(const std::string& ns, Query query); +/** + * Query handler that plugs in to a SyncClusterConnection and allows query on fastest host + * (if enabled). + * + * Glue code which shields the MultiHostQuery and server parameters from the separate client + * module which knows about neither. + * + * There is a *single* SCCFastQueryHandler for every SCC. Each SCCFastQueryHandler contains + * its own thread pool (lazily initialized) so that at maximum there is a thread-per-SCC-host + * and this thread may have an open connection to the host until it times out. + * If using the "fastestConfigReads" options, clients must be ready for the additional thread + * and connection load when configs are slow. + */ +class SCCFastQueryHandler : public SyncClusterConnection::QueryHandler { +public: + SCCFastQueryHandler(); - virtual std::unique_ptr<DBClientCursor> handleQuery(const std::vector<std::string>& hostStrings, - const std::string &ns, - Query query, - int nToReturn, - int nToSkip, - const BSONObj *fieldsToReturn, - int queryOptions, - int batchSize); + virtual ~SCCFastQueryHandler() {} - private: + virtual bool canHandleQuery(const std::string& ns, Query query); - // The thread pool itself is scoped to the handler and SCC, and lazily creates threads - // per-host as needed. This ensures query starvation cannot occur due to other active - // client threads - though a thread must be created for every client. - HostThreadPools _queryThreads; - }; + virtual std::unique_ptr<DBClientCursor> handleQuery(const std::vector<std::string>& hostStrings, + const std::string& ns, + Query query, + int nToReturn, + int nToSkip, + const BSONObj* fieldsToReturn, + int queryOptions, + int batchSize); +private: + // The thread pool itself is scoped to the handler and SCC, and lazily creates threads + // per-host as needed. This ensures query starvation cannot occur due to other active + // client threads - though a thread must be created for every client. + HostThreadPools _queryThreads; +}; } |