aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/connection.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/messagebus/connection.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/connection.h')
-rw-r--r--library/cpp/messagebus/connection.h84
1 files changed, 42 insertions, 42 deletions
diff --git a/library/cpp/messagebus/connection.h b/library/cpp/messagebus/connection.h
index b1df64ddc1..d88f6f753a 100644
--- a/library/cpp/messagebus/connection.h
+++ b/library/cpp/messagebus/connection.h
@@ -6,56 +6,56 @@
#include <util/generic/ptr.h>
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) {
- EMessageStatus status = SendMessage(mes.Get(), wait);
- if (status == MESSAGE_OK)
+ 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) {
+ EMessageStatus status = SendMessage(mes.Get(), wait);
+ if (status == MESSAGE_OK)
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) {
- EMessageStatus status = SendMessageOneWay(mes.Get(), wait);
- if (status == MESSAGE_OK)
+ return status;
+ }
+
+ /// Like SendMessageOneWay but cares about message
+ template <typename T /* <: TBusMessage */>
+ EMessageStatus SendMessageOneWayAutoPtr(const TAutoPtr<T>& mes, bool wait = false) {
+ EMessageStatus status = SendMessageOneWay(mes.Get(), wait);
+ if (status == MESSAGE_OK)
Y_UNUSED(mes.Release());
- return status;
- }
+ return status;
+ }
- EMessageStatus SendMessageMove(TBusMessageAutoPtr message, bool wait = false) {
- return SendMessageAutoPtr(message, wait);
- }
+ EMessageStatus SendMessageMove(TBusMessageAutoPtr message, bool wait = false) {
+ return SendMessageAutoPtr(message, wait);
+ }
- EMessageStatus SendMessageOneWayMove(TBusMessageAutoPtr message, bool wait = false) {
- return SendMessageOneWayAutoPtr(message, wait);
- }
+ EMessageStatus SendMessageOneWayMove(TBusMessageAutoPtr message, bool wait = false) {
+ return SendMessageOneWayAutoPtr(message, wait);
+ }
- // TODO: implement similar one-way methods
+ // TODO: implement similar one-way methods
- virtual ~TBusClientConnection() {
- }
+ virtual ~TBusClientConnection() {
+ }
};
- namespace NPrivate {
- struct TBusClientConnectionPtrOps {
- static void Ref(TBusClientConnection*);
- static void UnRef(TBusClientConnection*);
- };
- }
+ namespace NPrivate {
+ struct TBusClientConnectionPtrOps {
+ static void Ref(TBusClientConnection*);
+ static void UnRef(TBusClientConnection*);
+ };
+ }
- using TBusClientConnectionPtr = TIntrusivePtr<TBusClientConnection, NPrivate::TBusClientConnectionPtrOps>;
+ using TBusClientConnectionPtr = TIntrusivePtr<TBusClientConnection, NPrivate::TBusClientConnectionPtrOps>;
}