Joedb 10.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
joedb::Server_Client Class Reference

#include <joedb/concurrency/Server_Client.h>

Inheritance diagram for joedb::Server_Client:
Collaboration diagram for joedb::Server_Client:

Public Member Functions

 Server_Client (Channel &channel, Logger &logger=Logger::dummy_logger, std::chrono::milliseconds keep_alive_interval=std::chrono::milliseconds(0))
int64_t get_session_id () const
Thread_Safe< Channel & > & get_channel () override final
 ~Server_Client ()
Public Member Functions inherited from joedb::Logger
virtual ~Logger ()=default
Public Member Functions inherited from joedb::Ping_Client
void ping ()
virtual ~Ping_Client ()=default

Protected Member Functions

void download (Async_Writer &writer, Lock< Channel & > &lock, int64_t size) const
void log (beman::cstring_view message) noexcept override

Protected Attributes

Thread_Safe< Channel & > channel
Logger & logger
Buffer< 13 > buffer
int64_t session_id
bool pullonly_server
int64_t server_checkpoint

Friends

class Server_File

Additional Inherited Members

Static Public Attributes inherited from joedb::Logger
static Logger dummy_logger

Detailed Description

Definition at line 16 of file Server_Client.h.

Constructor & Destructor Documentation

◆ Server_Client()

joedb::Server_Client::Server_Client ( Channel & channel,
Logger & logger = Logger::dummy_logger,
std::chrono::milliseconds keep_alive_interval = std::chrono::milliseconds(0) )
Parameters
keep_alive_intervala background thread will send a ping to the server at this interval. Setting this parameter to zero disables the keep-alive background thread.

Definition at line 111 of file Server_Client.cpp.

◆ ~Server_Client()

joedb::Server_Client::~Server_Client ( )

Definition at line 142 of file Server_Client.cpp.

Member Function Documentation

◆ download()

void joedb::Server_Client::download ( Async_Writer & writer,
Lock< Channel & > & lock,
int64_t size ) const
protected

Definition at line 85 of file Server_Client.cpp.

◆ get_channel()

Thread_Safe< Channel & > & joedb::Server_Client::get_channel ( )
inlinefinaloverridevirtual

Implements joedb::Ping_Client.

Definition at line 60 of file Server_Client.h.

◆ get_session_id()

int64_t joedb::Server_Client::get_session_id ( ) const
inline

Definition at line 59 of file Server_Client.h.

◆ log()

void joedb::Server_Client::log ( beman::cstring_view message)
overrideprotectedvirtualnoexcept

Reimplemented from joedb::Logger.

Definition at line 10 of file Server_Client.cpp.

◆ Server_File

friend class Server_File
friend

Definition at line 18 of file Server_Client.h.

Member Data Documentation

◆ buffer

Buffer<13> joedb::Server_Client::buffer
mutableprotected

Definition at line 31 of file Server_Client.h.

◆ channel

Thread_Safe<Channel&> joedb::Server_Client::channel
mutableprotected

Definition at line 28 of file Server_Client.h.

◆ logger

Logger& joedb::Server_Client::logger
protected

Definition at line 29 of file Server_Client.h.

◆ pullonly_server

bool joedb::Server_Client::pullonly_server
protected

Definition at line 34 of file Server_Client.h.

◆ server_checkpoint

int64_t joedb::Server_Client::server_checkpoint
protected

Definition at line 35 of file Server_Client.h.

◆ session_id

int64_t joedb::Server_Client::session_id
protected

Definition at line 33 of file Server_Client.h.


The documentation for this class was generated from the following files: