summaryrefslogtreecommitdiff
path: root/src/mongo/transport
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-03-27 12:21:37 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2019-03-28 10:13:21 -0400
commitf922827d45ce752e148185dfa3a785f7c9cf29fd (patch)
treeb3ae7fdba18d9ef3384af6e0d009d091e5df14a3 /src/mongo/transport
parentf2f422d92b639edba0a10d40a43803723cb15baf (diff)
downloadmongo-f922827d45ce752e148185dfa3a785f7c9cf29fd.tar.gz
SERVER-40357 expand all calls to MONGO_DISALLOW_COPYING
produced by: hits="$(git grep -n MONGO_DISALLOW_COPYING | cut -d: -f1 )" for f in "$hits"; do sed -i.orig ' s/^\( *\)MONGO_DISALLOW_COPYING(\(.*\));/\1\2(const \2\&) = delete;\n\1\2\& operator=(const \2\&) = delete;/; ' $f done
Diffstat (limited to 'src/mongo/transport')
-rw-r--r--src/mongo/transport/message_compressor_base.h3
-rw-r--r--src/mongo/transport/message_compressor_manager.h4
-rw-r--r--src/mongo/transport/message_compressor_registry.h4
-rw-r--r--src/mongo/transport/mock_session.h3
-rw-r--r--src/mongo/transport/service_entry_point.h4
-rw-r--r--src/mongo/transport/service_entry_point_impl.h4
-rw-r--r--src/mongo/transport/session.h4
-rw-r--r--src/mongo/transport/session_asio.h3
-rw-r--r--src/mongo/transport/transport_layer.h3
-rw-r--r--src/mongo/transport/transport_layer_asio.h3
-rw-r--r--src/mongo/transport/transport_layer_manager.h3
-rw-r--r--src/mongo/transport/transport_layer_mock.h3
12 files changed, 24 insertions, 17 deletions
diff --git a/src/mongo/transport/message_compressor_base.h b/src/mongo/transport/message_compressor_base.h
index 910e7e41d3c..1ac7543bac9 100644
--- a/src/mongo/transport/message_compressor_base.h
+++ b/src/mongo/transport/message_compressor_base.h
@@ -49,7 +49,8 @@ StringData getMessageCompressorName(MessageCompressor id);
using MessageCompressorId = std::underlying_type<MessageCompressor>::type;
class MessageCompressorBase {
- MONGO_DISALLOW_COPYING(MessageCompressorBase);
+ MessageCompressorBase(const MessageCompressorBase&) = delete;
+ MessageCompressorBase& operator=(const MessageCompressorBase&) = delete;
public:
virtual ~MessageCompressorBase() = default;
diff --git a/src/mongo/transport/message_compressor_manager.h b/src/mongo/transport/message_compressor_manager.h
index f616cee6275..467d942b4c4 100644
--- a/src/mongo/transport/message_compressor_manager.h
+++ b/src/mongo/transport/message_compressor_manager.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/transport/message_compressor_base.h"
#include "mongo/transport/session.h"
@@ -44,7 +43,8 @@ class Message;
class MessageCompressorRegistry;
class MessageCompressorManager {
- MONGO_DISALLOW_COPYING(MessageCompressorManager);
+ MessageCompressorManager(const MessageCompressorManager&) = delete;
+ MessageCompressorManager& operator=(const MessageCompressorManager&) = delete;
public:
/*
diff --git a/src/mongo/transport/message_compressor_registry.h b/src/mongo/transport/message_compressor_registry.h
index d3413aa207f..160475675ae 100644
--- a/src/mongo/transport/message_compressor_registry.h
+++ b/src/mongo/transport/message_compressor_registry.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/transport/message_compressor_base.h"
#include "mongo/util/string_map.h"
@@ -54,7 +53,8 @@ namespace moe = mongo::optionenvironment;
* The MessageCompressorRegistry holds the global registrations of compressors for a process.
*/
class MessageCompressorRegistry {
- MONGO_DISALLOW_COPYING(MessageCompressorRegistry);
+ MessageCompressorRegistry(const MessageCompressorRegistry&) = delete;
+ MessageCompressorRegistry& operator=(const MessageCompressorRegistry&) = delete;
public:
MessageCompressorRegistry() = default;
diff --git a/src/mongo/transport/mock_session.h b/src/mongo/transport/mock_session.h
index 7448f9d1ddb..f9922a4f7af 100644
--- a/src/mongo/transport/mock_session.h
+++ b/src/mongo/transport/mock_session.h
@@ -38,7 +38,8 @@ namespace mongo {
namespace transport {
class MockSession : public Session {
- MONGO_DISALLOW_COPYING(MockSession);
+ MockSession(const MockSession&) = delete;
+ MockSession& operator=(const MockSession&) = delete;
public:
static std::shared_ptr<MockSession> create(TransportLayer* tl) {
diff --git a/src/mongo/transport/service_entry_point.h b/src/mongo/transport/service_entry_point.h
index 63822aa0486..3faa834ea97 100644
--- a/src/mongo/transport/service_entry_point.h
+++ b/src/mongo/transport/service_entry_point.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/dbmessage.h"
#include "mongo/transport/session.h"
@@ -44,7 +43,8 @@ namespace mongo {
* reply-with-Message loop. It may not do this on the TransportLayer’s thread.
*/
class ServiceEntryPoint {
- MONGO_DISALLOW_COPYING(ServiceEntryPoint);
+ ServiceEntryPoint(const ServiceEntryPoint&) = delete;
+ ServiceEntryPoint& operator=(const ServiceEntryPoint&) = delete;
public:
virtual ~ServiceEntryPoint() = default;
diff --git a/src/mongo/transport/service_entry_point_impl.h b/src/mongo/transport/service_entry_point_impl.h
index 1a9cbd5f762..87a8d815c91 100644
--- a/src/mongo/transport/service_entry_point_impl.h
+++ b/src/mongo/transport/service_entry_point_impl.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/list.h"
@@ -56,7 +55,8 @@ class Session;
* (transport::Session).
*/
class ServiceEntryPointImpl : public ServiceEntryPoint {
- MONGO_DISALLOW_COPYING(ServiceEntryPointImpl);
+ ServiceEntryPointImpl(const ServiceEntryPointImpl&) = delete;
+ ServiceEntryPointImpl& operator=(const ServiceEntryPointImpl&) = delete;
public:
explicit ServiceEntryPointImpl(ServiceContext* svcCtx);
diff --git a/src/mongo/transport/session.h b/src/mongo/transport/session.h
index 58bb90bf18c..b2a9b2ba1a6 100644
--- a/src/mongo/transport/session.h
+++ b/src/mongo/transport/session.h
@@ -31,7 +31,6 @@
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/baton.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/rpc/message.h"
@@ -55,7 +54,8 @@ using ConstSessionHandle = std::shared_ptr<const Session>;
* (on the transport side) and Messages with Client objects (on the database side).
*/
class Session : public std::enable_shared_from_this<Session>, public Decorable<Session> {
- MONGO_DISALLOW_COPYING(Session);
+ Session(const Session&) = delete;
+ Session& operator=(const Session&) = delete;
public:
/**
diff --git a/src/mongo/transport/session_asio.h b/src/mongo/transport/session_asio.h
index b766b33a9e6..f2113dc29e5 100644
--- a/src/mongo/transport/session_asio.h
+++ b/src/mongo/transport/session_asio.h
@@ -74,7 +74,8 @@ Future<void> futurize(const std::error_code& ec) {
using GenericSocket = asio::generic::stream_protocol::socket;
class TransportLayerASIO::ASIOSession final : public Session {
- MONGO_DISALLOW_COPYING(ASIOSession);
+ ASIOSession(const ASIOSession&) = delete;
+ ASIOSession& operator=(const ASIOSession&) = delete;
public:
// If the socket is disconnected while any of these options are being set, this constructor
diff --git a/src/mongo/transport/transport_layer.h b/src/mongo/transport/transport_layer.h
index 8e98aa15caa..6d6027e7d83 100644
--- a/src/mongo/transport/transport_layer.h
+++ b/src/mongo/transport/transport_layer.h
@@ -65,7 +65,8 @@ using ReactorHandle = std::shared_ptr<Reactor>;
* References to the TransportLayer should be stored on service context objects.
*/
class TransportLayer {
- MONGO_DISALLOW_COPYING(TransportLayer);
+ TransportLayer(const TransportLayer&) = delete;
+ TransportLayer& operator=(const TransportLayer&) = delete;
public:
static const Status SessionUnknownStatus;
diff --git a/src/mongo/transport/transport_layer_asio.h b/src/mongo/transport/transport_layer_asio.h
index 31a0be0d6b9..e37f72c40aa 100644
--- a/src/mongo/transport/transport_layer_asio.h
+++ b/src/mongo/transport/transport_layer_asio.h
@@ -79,7 +79,8 @@ MONGO_FAIL_POINT_DECLARE(transportLayerASIOasyncConnectTimesOut);
* A TransportLayer implementation based on ASIO networking primitives.
*/
class TransportLayerASIO final : public TransportLayer {
- MONGO_DISALLOW_COPYING(TransportLayerASIO);
+ TransportLayerASIO(const TransportLayerASIO&) = delete;
+ TransportLayerASIO& operator=(const TransportLayerASIO&) = delete;
public:
struct Options {
diff --git a/src/mongo/transport/transport_layer_manager.h b/src/mongo/transport/transport_layer_manager.h
index e6159d730c4..1dd5ef38527 100644
--- a/src/mongo/transport/transport_layer_manager.h
+++ b/src/mongo/transport/transport_layer_manager.h
@@ -50,7 +50,8 @@ namespace transport {
* underneath.
*/
class TransportLayerManager final : public TransportLayer {
- MONGO_DISALLOW_COPYING(TransportLayerManager);
+ TransportLayerManager(const TransportLayerManager&) = delete;
+ TransportLayerManager& operator=(const TransportLayerManager&) = delete;
public:
TransportLayerManager(std::vector<std::unique_ptr<TransportLayer>> tls)
diff --git a/src/mongo/transport/transport_layer_mock.h b/src/mongo/transport/transport_layer_mock.h
index a2ade4a1a6f..eb095b1e65e 100644
--- a/src/mongo/transport/transport_layer_mock.h
+++ b/src/mongo/transport/transport_layer_mock.h
@@ -43,7 +43,8 @@ namespace transport {
* This TransportLayerMock is a noop TransportLayer implementation.
*/
class TransportLayerMock : public TransportLayer {
- MONGO_DISALLOW_COPYING(TransportLayerMock);
+ TransportLayerMock(const TransportLayerMock&) = delete;
+ TransportLayerMock& operator=(const TransportLayerMock&) = delete;
public:
TransportLayerMock();