aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/connection.h
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commitc2a1af049e9deca890e9923abe64fe6c59060348 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/messagebus/connection.h
parent1f553f46fb4f3c5eec631352cdd900a0709016af (diff)
downloadydb-c2a1af049e9deca890e9923abe64fe6c59060348.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/connection.h')
-rw-r--r--library/cpp/messagebus/connection.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/messagebus/connection.h b/library/cpp/messagebus/connection.h
index 9a2493162f..b1df64ddc1 100644
--- a/library/cpp/messagebus/connection.h
+++ b/library/cpp/messagebus/connection.h
@@ -1,22 +1,22 @@
-#pragma once
-
-#include "defs.h"
-#include "message.h"
-
+#pragma once
+
+#include "defs.h"
+#include "message.h"
+
#include <util/generic/ptr.h>
-namespace NBus {
+namespace NBus {
struct TBusClientConnection {
/// if you want to open connection early
virtual void OpenConnection() = 0;
-
+
/// Send message to the destination
/// If addr is set then use it as destination.
/// Takes ownership of addr (see ClearState method).
virtual EMessageStatus SendMessage(TBusMessage* pMes, bool wait = false) = 0;
-
+
virtual EMessageStatus SendMessageOneWay(TBusMessage* pMes, bool wait = false) = 0;
-
+
/// Like SendMessage but cares about message
template <typename T /* <: TBusMessage */>
EMessageStatus SendMessageAutoPtr(const TAutoPtr<T>& mes, bool wait = false) {
@@ -25,7 +25,7 @@ namespace NBus {
Y_UNUSED(mes.Release());
return status;
}
-
+
/// Like SendMessageOneWay but cares about message
template <typename T /* <: TBusMessage */>
EMessageStatus SendMessageOneWayAutoPtr(const TAutoPtr<T>& mes, bool wait = false) {
@@ -34,28 +34,28 @@ namespace NBus {
Y_UNUSED(mes.Release());
return status;
}
-
+
EMessageStatus SendMessageMove(TBusMessageAutoPtr message, bool wait = false) {
return SendMessageAutoPtr(message, wait);
}
-
+
EMessageStatus SendMessageOneWayMove(TBusMessageAutoPtr message, bool wait = false) {
return SendMessageOneWayAutoPtr(message, wait);
}
-
+
// TODO: implement similar one-way methods
-
+
virtual ~TBusClientConnection() {
}
- };
-
+ };
+
namespace NPrivate {
struct TBusClientConnectionPtrOps {
static void Ref(TBusClientConnection*);
static void UnRef(TBusClientConnection*);
};
}
-
+
using TBusClientConnectionPtr = TIntrusivePtr<TBusClientConnection, NPrivate::TBusClientConnectionPtrOps>;
-
-}
+
+}