1#ifndef joedb_Robust_Connection_declared 
    2#define joedb_Robust_Connection_declared 
   15  using clock = std::chrono::steady_clock;
 
   16  using time_point = std::chrono::time_point<clock>;
 
   21   mutable std::unique_ptr<Channel> channel;
 
   26   static constexpr auto period = std::chrono::seconds(5);
 
   27   mutable time_point last_connection_time = clock::now() - period;
 
   29   void log_exception(
const std::exception *e) 
const;
 
   34   void reconnect(
const std::exception *e) 
const;
 
   48     catch (std::exception &e)
 
 
   63   size_t pread(
char *data, 
size_t size, int64_t offset) 
const;
 
   76    std::chrono::milliseconds wait
 
   82    int64_t from_checkpoint,
 
   83    int64_t until_checkpoint,
 
 
Used by Robust_Connection to reconnect after an error.
 
joedb::Robust_Connection does not try to reconnect when thrown
 
Server_Connection that automatically reconnects on error
 
bool is_pullonly() const override
 
void reconnect(const std::exception *e) const
 
Robust_Connection(const Connector &connector, Logger &logger)
 
int64_t pull(Lock_Action lock_action, Data_Transfer data_transfer, Writable_Journal &client_journal, std::chrono::milliseconds wait) override
Pull from the connection.
 
std::unique_ptr< Server_Connection > connection
 
size_t pread(char *data, size_t size, int64_t offset) const
 
int64_t handshake(const Readonly_Journal &client_journal, Content_Check content_check) override
Called during Client construction.
 
auto try_until_success(const F &f) const
 
int64_t push(const Readonly_Journal &client_journal, int64_t from_checkpoint, int64_t until_checkpoint, Unlock_Action unlock_action) override
Push new data to the connection.
 
void unlock() override
Unlock the connection.