hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
k_times_reconnection_strategy.hpp
Go to the documentation of this file.
1 
7 
8 #ifndef IROHA_K_TIMES_RECONNECTION_STRATEGY_HPP
9 #define IROHA_K_TIMES_RECONNECTION_STRATEGY_HPP
10 
11 namespace iroha {
12  namespace ametsuchi {
18  public:
22  KTimesReconnectionStrategy(size_t number_of_reconnections);
23 
26  const KTimesReconnectionStrategy &) = delete;
27 
28  bool canReconnect() override;
29  void reset() override;
30 
31  private:
32  const size_t max_number_of_reconnections_;
33  size_t current_number_of_reconnections_;
34  };
35 
38  public:
39  KTimesReconnectionStrategyFactory(size_t number_of_reconnections);
40 
41  std::unique_ptr<ReconnectionStrategy> create() override;
42 
43  private:
44  const size_t max_number_of_reconnections_;
45  };
46 
47  } // namespace ametsuchi
48 } // namespace iroha
49 
50 #endif // IROHA_K_TIMES_RECONNECTION_STRATEGY_HPP
Definition: reconnection_strategy.hpp:35
KTimesReconnectionStrategy(size_t number_of_reconnections)
Definition: k_times_reconnection_strategy.cpp:12
bool canReconnect() override
Definition: k_times_reconnection_strategy.cpp:17
Definition: block_query.hpp:14
KTimesReconnectionStrategy & operator=(const KTimesReconnectionStrategy &)=delete
Definition: k_times_reconnection_strategy.hpp:17
void reset() override
Definition: k_times_reconnection_strategy.cpp:23
Definition: reconnection_strategy.hpp:16
Definition: k_times_reconnection_strategy.hpp:36