|
Joedb 10.3.0
The Journal-Only Embedded Database
|
#include <joedb/concurrency/Connection.h>


Public Member Functions | |
| virtual int64_t | handshake (const Readonly_Journal &client_journal, Content_Check content_check) |
| Called during Client construction. | |
| virtual int64_t | pull (Lock_Action lock_action, Data_Transfer data_transfer, Writable_Journal &client_journal, std::chrono::milliseconds wait=std::chrono::milliseconds(0)) |
| Pull from the connection. | |
| virtual int64_t | push (const Readonly_Journal &client_journal, int64_t from, int64_t until, Unlock_Action unlock_action) |
| Push new data to the connection. | |
| virtual void | unlock () |
| Unlock the connection. | |
| virtual bool | is_pullonly () const |
| virtual | ~Connection () |
Static Public Attributes | |
| static Connection | dummy |
| Since this class has no internal state, this global variable can be used instead of creating an instance. | |
Protected Member Functions | |
| Connection ()=default | |
Static Protected Member Functions | |
| static void | content_mismatch () |
| Called by handshake when the file and the connection do not match. | |
Definition at line 48 of file Connection.h.
|
protecteddefault |
|
virtualdefault |
|
staticprotected |
Definition at line 12 of file Connection.cpp.
|
virtual |
| client_journal | may be used to check matching content |
| content_check | indicates how matching content is tested |
Reimplemented in joedb::Pullonly_Journal_Connection, joedb::Robust_Connection, joedb::Server_Connection, and joedb::Server_File.
Definition at line 17 of file Connection.cpp.
|
virtual |
Reimplemented in joedb::Robust_Connection, and joedb::Server_Connection.
Definition at line 52 of file Connection.cpp.
|
virtual |
| lock_action | whether the connection should be locked before pulling |
| data_transfer | whether data should be transferred |
| client_journal | journal to pull into |
| wait | duration during which the connection may wait for new data if the pull would otherwise be empty |
Reimplemented in joedb::Pullonly_Journal_Connection, joedb::Journal_Connection, joedb::Robust_Connection, joedb::Server_File, and joedb::Server_Connection.
Definition at line 26 of file Connection.cpp.
|
virtual |
Reimplemented in joedb::Pullonly_Journal_Connection, joedb::Journal_Connection, joedb::Server_Connection, joedb::Robust_Connection, and joedb::Server_File.
Definition at line 37 of file Connection.cpp.
|
virtual |
Reimplemented in joedb::Journal_Connection, joedb::Robust_Connection, and joedb::Server_Connection.
Definition at line 48 of file Connection.cpp.
|
static |
The default constructor is protected to force using it.
Definition at line 107 of file Connection.h.