#include <joedb/concurrency/File_Connection.h>
|
| | Pullonly_Journal_Connection (Readonly_Journal &server_journal) |
| bool | is_pullonly () const override |
| int64_t | handshake (const Readonly_Journal &client_journal, Content_Check content_check) override |
| | Called during Client construction.
|
| void | check_matching_content (const Readonly_Journal &client_journal, Content_Check content_check, int64_t from, int64_t until) override |
| | Compare content of file and connection. Throw if mismatch.
|
| 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.
|
| virtual void | unlock () |
| | Unlock the connection.
|
| virtual | ~Connection () |
|
| static Connection | dummy |
| | Since this class has no internal state, this global variable can be used instead of creating an instance.
|
| | Connection ()=default |
| static void | content_mismatch () |
| | Called by handshake when the file and the connection do not match.
|
Definition at line 9 of file File_Connection.h.
◆ Pullonly_Journal_Connection()
| joedb::Pullonly_Journal_Connection::Pullonly_Journal_Connection |
( |
Readonly_Journal & | server_journal | ) |
|
|
inline |
◆ check_matching_content()
| void joedb::Pullonly_Journal_Connection::check_matching_content |
( |
const Readonly_Journal & | client_journal, |
|
|
Content_Check | content_check, |
|
|
int64_t | from, |
|
|
int64_t | until ) |
|
overridevirtual |
◆ handshake()
- Parameters
-
| client_journal | may be used to check matching content |
| content_check | indicates how matching content is tested |
- Returns
- connection checkpoint
Reimplemented from joedb::Connection.
Definition at line 6 of file File_Connection.cpp.
◆ is_pullonly()
| bool joedb::Pullonly_Journal_Connection::is_pullonly |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ pull()
- Parameters
-
| 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 |
- Returns
- connection checkpoint
Reimplemented from joedb::Connection.
Definition at line 59 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 |
◆ server_journal
The documentation for this class was generated from the following files: