diff options
Diffstat (limited to 'src/mongo/s')
-rw-r--r-- | src/mongo/s/catalog/dist_lock_catalog_mock.h | 41 | ||||
-rw-r--r-- | src/mongo/s/catalog/dist_lock_manager_mock.h | 4 | ||||
-rw-r--r-- | src/mongo/s/catalog_cache_loader.h | 4 | ||||
-rw-r--r-- | src/mongo/s/client/shard_factory.h | 4 | ||||
-rw-r--r-- | src/mongo/s/commands/cluster_command_test_fixture.h | 2 | ||||
-rw-r--r-- | src/mongo/s/config_server_catalog_cache_loader.cpp | 2 | ||||
-rw-r--r-- | src/mongo/s/config_server_catalog_cache_loader.h | 2 | ||||
-rw-r--r-- | src/mongo/s/grid.h | 5 | ||||
-rw-r--r-- | src/mongo/s/query/cluster_client_cursor_mock.cpp | 2 | ||||
-rw-r--r-- | src/mongo/s/query/cluster_client_cursor_mock.h | 9 | ||||
-rw-r--r-- | src/mongo/s/sharding_initialization.h | 4 |
11 files changed, 39 insertions, 40 deletions
diff --git a/src/mongo/s/catalog/dist_lock_catalog_mock.h b/src/mongo/s/catalog/dist_lock_catalog_mock.h index d8b9a5a42bc..4fd6562cdc5 100644 --- a/src/mongo/s/catalog/dist_lock_catalog_mock.h +++ b/src/mongo/s/catalog/dist_lock_catalog_mock.h @@ -29,11 +29,12 @@ #pragma once +#include <functional> + #include "mongo/base/status_with.h" #include "mongo/s/catalog/dist_lock_catalog.h" #include "mongo/s/catalog/type_lockpings.h" #include "mongo/s/catalog/type_locks.h" -#include "mongo/stdx/functional.h" #include "mongo/stdx/mutex.h" namespace mongo { @@ -69,26 +70,26 @@ public: DistLockCatalogMock(); virtual ~DistLockCatalogMock(); - using GrabLockFunc = stdx::function<void(StringData lockID, - const OID& lockSessionID, - StringData who, - StringData processId, - Date_t time, - StringData why)>; - using OvertakeLockFunc = stdx::function<void(StringData lockID, - const OID& lockSessionID, - const OID& currentHolderTS, - StringData who, - StringData processId, - Date_t time, - StringData why)>; - using UnlockFunc = stdx::function<void(const OID& lockSessionID)>; - using PingFunc = stdx::function<void(StringData processID, Date_t ping)>; - using StopPingFunc = stdx::function<void(StringData processID)>; + using GrabLockFunc = std::function<void(StringData lockID, + const OID& lockSessionID, + StringData who, + StringData processId, + Date_t time, + StringData why)>; + using OvertakeLockFunc = std::function<void(StringData lockID, + const OID& lockSessionID, + const OID& currentHolderTS, + StringData who, + StringData processId, + Date_t time, + StringData why)>; + using UnlockFunc = std::function<void(const OID& lockSessionID)>; + using PingFunc = std::function<void(StringData processID, Date_t ping)>; + using StopPingFunc = std::function<void(StringData processID)>; using GetPingFunc = StopPingFunc; - using GetLockByTSFunc = stdx::function<void(const OID& ts)>; - using GetLockByNameFunc = stdx::function<void(StringData name)>; - using GetServerInfoFunc = stdx::function<void()>; + using GetLockByTSFunc = std::function<void(const OID& ts)>; + using GetLockByNameFunc = std::function<void(StringData name)>; + using GetServerInfoFunc = std::function<void()>; virtual StatusWith<LockpingsType> getPing(OperationContext* opCtx, StringData processID) override; diff --git a/src/mongo/s/catalog/dist_lock_manager_mock.h b/src/mongo/s/catalog/dist_lock_manager_mock.h index 7c2ad8a07ef..bf8081b50c5 100644 --- a/src/mongo/s/catalog/dist_lock_manager_mock.h +++ b/src/mongo/s/catalog/dist_lock_manager_mock.h @@ -29,12 +29,12 @@ #pragma once +#include <functional> #include <string> #include <vector> #include "mongo/s/catalog/dist_lock_catalog.h" #include "mongo/s/catalog/dist_lock_manager.h" -#include "mongo/stdx/functional.h" namespace mongo { @@ -63,7 +63,7 @@ public: void unlockAll(OperationContext* opCtx, const std::string& processID) override; using LockFunc = - stdx::function<void(StringData name, StringData whyMessage, Milliseconds waitFor)>; + std::function<void(StringData name, StringData whyMessage, Milliseconds waitFor)>; void expectLock(LockFunc checkerFunc, Status lockStatus); diff --git a/src/mongo/s/catalog_cache_loader.h b/src/mongo/s/catalog_cache_loader.h index cb00ae17bac..16276074373 100644 --- a/src/mongo/s/catalog_cache_loader.h +++ b/src/mongo/s/catalog_cache_loader.h @@ -91,7 +91,7 @@ public: }; using GetChunksSinceCallbackFn = - stdx::function<void(OperationContext*, StatusWith<CollectionAndChangedChunks>)>; + std::function<void(OperationContext*, StatusWith<CollectionAndChangedChunks>)>; /** * Initializes internal state. Must be called only once when sharding state is initialized. @@ -141,7 +141,7 @@ public: */ virtual void getDatabase( StringData dbName, - stdx::function<void(OperationContext*, StatusWith<DatabaseType>)> callbackFn) = 0; + std::function<void(OperationContext*, StatusWith<DatabaseType>)> callbackFn) = 0; /** * Waits for any pending changes for the specified collection to be persisted locally (not diff --git a/src/mongo/s/client/shard_factory.h b/src/mongo/s/client/shard_factory.h index c830a470fda..bbd07b061f9 100644 --- a/src/mongo/s/client/shard_factory.h +++ b/src/mongo/s/client/shard_factory.h @@ -34,11 +34,9 @@ #include <memory> #include <string> - #include "mongo/client/connection_string.h" #include "mongo/client/remote_command_targeter_factory.h" #include "mongo/s/client/shard.h" -#include "mongo/stdx/functional.h" namespace mongo { @@ -51,7 +49,7 @@ class ShardFactory { public: using BuilderCallable = - stdx::function<std::unique_ptr<Shard>(const ShardId&, const ConnectionString&)>; + std::function<std::unique_ptr<Shard>(const ShardId&, const ConnectionString&)>; using BuildersMap = std::map<ConnectionString::ConnectionType, BuilderCallable>; ShardFactory(BuildersMap&&, std::unique_ptr<RemoteCommandTargeterFactory>); diff --git a/src/mongo/s/commands/cluster_command_test_fixture.h b/src/mongo/s/commands/cluster_command_test_fixture.h index 97739c7ef18..9c5406c073b 100644 --- a/src/mongo/s/commands/cluster_command_test_fixture.h +++ b/src/mongo/s/commands/cluster_command_test_fixture.h @@ -36,7 +36,7 @@ namespace mongo { -using InspectionCallback = stdx::function<void(const executor::RemoteCommandRequest& request)>; +using InspectionCallback = std::function<void(const executor::RemoteCommandRequest& request)>; class ClusterCommandTestFixture : public CatalogCacheTestFixture { protected: diff --git a/src/mongo/s/config_server_catalog_cache_loader.cpp b/src/mongo/s/config_server_catalog_cache_loader.cpp index 0776a4c3626..c97856075e6 100644 --- a/src/mongo/s/config_server_catalog_cache_loader.cpp +++ b/src/mongo/s/config_server_catalog_cache_loader.cpp @@ -198,7 +198,7 @@ std::shared_ptr<Notification<void>> ConfigServerCatalogCacheLoader::getChunksSin void ConfigServerCatalogCacheLoader::getDatabase( StringData dbName, - stdx::function<void(OperationContext*, StatusWith<DatabaseType>)> callbackFn) { + std::function<void(OperationContext*, StatusWith<DatabaseType>)> callbackFn) { _threadPool.schedule([ name = dbName.toString(), callbackFn ](auto status) noexcept { invariant(status); diff --git a/src/mongo/s/config_server_catalog_cache_loader.h b/src/mongo/s/config_server_catalog_cache_loader.h index 56cb65528c0..d70c86f0d88 100644 --- a/src/mongo/s/config_server_catalog_cache_loader.h +++ b/src/mongo/s/config_server_catalog_cache_loader.h @@ -56,7 +56,7 @@ public: void getDatabase( StringData dbName, - stdx::function<void(OperationContext*, StatusWith<DatabaseType>)> callbackFn) override; + std::function<void(OperationContext*, StatusWith<DatabaseType>)> callbackFn) override; private: // Thread pool to be used to perform metadata load diff --git a/src/mongo/s/grid.h b/src/mongo/s/grid.h index 794a93f262f..db9a3fbad89 100644 --- a/src/mongo/s/grid.h +++ b/src/mongo/s/grid.h @@ -29,11 +29,12 @@ #pragma once +#include <functional> + #include "mongo/db/repl/optime.h" #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/client/shard_registry.h" -#include "mongo/stdx/functional.h" #include "mongo/stdx/memory.h" #include "mongo/stdx/mutex.h" @@ -58,7 +59,7 @@ public: Grid(); ~Grid(); - using CustomConnectionPoolStatsFn = stdx::function<void(executor::ConnectionPoolStats* stats)>; + using CustomConnectionPoolStatsFn = std::function<void(executor::ConnectionPoolStats* stats)>; /** * Retrieves the instance of Grid associated with the current service/operation context. diff --git a/src/mongo/s/query/cluster_client_cursor_mock.cpp b/src/mongo/s/query/cluster_client_cursor_mock.cpp index cce3f218477..499cacdf81d 100644 --- a/src/mongo/s/query/cluster_client_cursor_mock.cpp +++ b/src/mongo/s/query/cluster_client_cursor_mock.cpp @@ -39,7 +39,7 @@ namespace mongo { ClusterClientCursorMock::ClusterClientCursorMock(boost::optional<LogicalSessionId> lsid, boost::optional<TxnNumber> txnNumber, - stdx::function<void(void)> killCallback) + std::function<void(void)> killCallback) : _killCallback(std::move(killCallback)), _lsid(lsid), _txnNumber(txnNumber) {} ClusterClientCursorMock::~ClusterClientCursorMock() { diff --git a/src/mongo/s/query/cluster_client_cursor_mock.h b/src/mongo/s/query/cluster_client_cursor_mock.h index f99d2e77b94..783a038eea1 100644 --- a/src/mongo/s/query/cluster_client_cursor_mock.h +++ b/src/mongo/s/query/cluster_client_cursor_mock.h @@ -29,13 +29,12 @@ #pragma once -#include <queue> - #include <boost/optional.hpp> +#include <functional> +#include <queue> #include "mongo/db/logical_session_id.h" #include "mongo/s/query/cluster_client_cursor.h" -#include "mongo/stdx/functional.h" namespace mongo { @@ -46,7 +45,7 @@ class ClusterClientCursorMock final : public ClusterClientCursor { public: ClusterClientCursorMock(boost::optional<LogicalSessionId> lsid, boost::optional<TxnNumber> txnNumber, - stdx::function<void(void)> killCallback = stdx::function<void(void)>()); + std::function<void(void)> killCallback = {}); ~ClusterClientCursorMock(); @@ -118,7 +117,7 @@ private: bool _killed = false; bool _exhausted = false; std::queue<StatusWith<ClusterQueryResult>> _resultsQueue; - stdx::function<void(void)> _killCallback; + std::function<void(void)> _killCallback; // Originating command object. BSONObj _originatingCommand; diff --git a/src/mongo/s/sharding_initialization.h b/src/mongo/s/sharding_initialization.h index e3e7acce876..2121c119007 100644 --- a/src/mongo/s/sharding_initialization.h +++ b/src/mongo/s/sharding_initialization.h @@ -30,10 +30,10 @@ #pragma once #include <boost/optional.hpp> +#include <functional> #include "mongo/base/string_data.h" #include "mongo/bson/oid.h" -#include "mongo/stdx/functional.h" #include "mongo/stdx/memory.h" namespace mongo { @@ -52,7 +52,7 @@ class TaskExecutor; namespace rpc { class EgressMetadataHook; -using ShardingEgressMetadataHookBuilder = stdx::function<std::unique_ptr<EgressMetadataHook>()>; +using ShardingEgressMetadataHookBuilder = std::function<std::unique_ptr<EgressMetadataHook>()>; } // namespace rpc /** |