blob: 2fa8ec5c9bc1aa53941d3aa9b3aa57730b73d4c5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#pragma once
#include <yt/cpp/mapreduce/common/fwd.h>
#include <yt/cpp/mapreduce/http/requests.h>
#include <util/generic/ptr.h>
#include <util/system/thread.h>
namespace NYT {
////////////////////////////////////////////////////////////////////////////////
class TPingableTransaction;
// Don't want to include public.h to avoid polluting header with TIntrusivePtr
template <typename>
class TFuture;
////////////////////////////////////////////////////////////////////////////////
// Each registered transaction must be removed from pinger
// (using RemoveTransaction) before it is destroyed
class ITransactionPinger
: public TThrRefBase
{
public:
virtual ~ITransactionPinger() = default;
virtual ITransactionPingerPtr GetChildTxPinger() = 0;
virtual void RegisterTransaction(const TPingableTransaction& pingableTx) = 0;
virtual bool HasTransaction(const TPingableTransaction& pingableTx) = 0;
virtual void RemoveTransaction(const TPingableTransaction& pingableTx) = 0;
virtual TFuture<void> AsyncAbortTransaction(const TTransactionId& transactionId) = 0;
};
ITransactionPingerPtr CreateTransactionPinger(const TConfigPtr& config, IRawClientPtr rawClient);
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT
|