blob: 98e8b5cb2f810e54ea7875ea9cb9550bb2160033 (
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
|
#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;
////////////////////////////////////////////////////////////////////////////////
// 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;
};
ITransactionPingerPtr CreateTransactionPinger(const TConfigPtr& config);
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT
|