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

#include <joedb/concurrency/File_Connection.h>

Inheritance diagram for joedb::Pullonly_Journal_Connection:
Collaboration diagram for joedb::Pullonly_Journal_Connection:

Public Member Functions

 Pullonly_Journal_Connection (Readonly_Journal &server_journal)
int64_t handshake (const Readonly_Journal &client_journal, Content_Check content_check) override
 Called during Client construction.
int64_t pull (Lock_Action lock_action, Data_Transfer data_transfer, Writable_Journal &client_journal, std::chrono::milliseconds wait) override
 Pull from the connection.
int64_t push (const Readonly_Journal &client_journal, const int64_t from, const int64_t until, Unlock_Action unlock_action) override
 Push new data to the connection.
Public Member Functions inherited from joedb::Connection
virtual void unlock ()
 Unlock the connection.
virtual bool is_pullonly () const
virtual ~Connection ()

Protected Attributes

Readonly_Journal & server_journal

Additional Inherited Members

Static Public Attributes inherited from joedb::Connection
static Connection dummy
 Since this class has no internal state, this global variable can be used instead of creating an instance.
Protected Member Functions inherited from joedb::Connection
 Connection ()=default
Static Protected Member Functions inherited from joedb::Connection
static void content_mismatch ()
 Called by handshake when the file and the connection do not match.

Detailed Description

Definition at line 9 of file File_Connection.h.

Constructor & Destructor Documentation

◆ Pullonly_Journal_Connection()

joedb::Pullonly_Journal_Connection::Pullonly_Journal_Connection ( Readonly_Journal & server_journal)
inline

Definition at line 15 of file File_Connection.h.

Member Function Documentation

◆ handshake()

int64_t joedb::Pullonly_Journal_Connection::handshake ( const Readonly_Journal & client_journal,
Content_Check content_check )
overridevirtual
Parameters
client_journalmay be used to check matching content
content_checkindicates how matching content is tested
Returns
connection checkpoint

Reimplemented from joedb::Connection.

Definition at line 6 of file File_Connection.cpp.

◆ pull()

int64_t joedb::Pullonly_Journal_Connection::pull ( Lock_Action lock_action,
Data_Transfer data_transfer,
Writable_Journal & client_journal,
std::chrono::milliseconds wait )
overridevirtual
Parameters
lock_actionwhether the connection should be locked before pulling
data_transferwhether data should be transferred
client_journaljournal to pull into
waitduration during which the connection may wait for new data if the pull would otherwise be empty
Returns
connection checkpoint

Reimplemented from joedb::Connection.

Definition at line 45 of file File_Connection.cpp.

◆ push()

int64_t joedb::Pullonly_Journal_Connection::push ( const Readonly_Journal & client_journal,
const int64_t from,
const int64_t until,
Unlock_Action unlock_action )
overridevirtual
Returns
connection checkpoint

Reimplemented from joedb::Connection.

Definition at line 66 of file File_Connection.cpp.

Member Data Documentation

◆ server_journal

Readonly_Journal& joedb::Pullonly_Journal_Connection::server_journal
protected

Definition at line 12 of file File_Connection.h.


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