Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
joedb::Pullonly_Journal_Connection Class Reference

#include <joedb/concurrency/File_Connection.h>

Inheritance diagram for joedb::Pullonly_Journal_Connection:
Inheritance graph
[legend]
Collaboration diagram for joedb::Pullonly_Journal_Connection:
Collaboration graph
[legend]

Public Member Functions

 Pullonly_Journal_Connection (Readonly_Journal &server_journal)
 
int64_t handshake (Readonly_Journal &client_journal, bool content_check) override
 Called during Client construction.
 
int64_t pull (Writable_Journal &client_journal, std::chrono::milliseconds) override
 Pull new data from the connection.
 
int64_t get_checkpoint (Readonly_Journal &client_journal, std::chrono::milliseconds) override
 Get new connection checkpoint without pulling.
 
int64_t lock_pull (Writable_Journal &client_journal, std::chrono::milliseconds) override
 Fused lock_pull, executed at the start of a write transaction.
 
int64_t push_until (Readonly_Journal &client_journal, const int64_t from_checkpoint, const int64_t until_checkpoint, bool unlock_after) override
 Push new data to the connection.
 
- Public Member Functions inherited from joedb::Connection
int64_t push (Readonly_Journal &client_journal, int64_t from_checkpoint, bool unlock_after)
 Shortcut to call push_until until the client checkpoint.
 
virtual void unlock ()
 Can be used to cancel a transaction without pushing.
 
virtual ~Connection ()
 

Protected Attributes

Readonly_Journalserver_journal
 

Additional Inherited Members

- Static Protected Member Functions inherited from joedb::Connection
static void content_mismatch ()
 

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

◆ get_checkpoint()

int64_t joedb::Pullonly_Journal_Connection::get_checkpoint ( Readonly_Journal client_journal,
std::chrono::milliseconds  wait 
)
overridevirtual
Return values
server_checkpoint

Reimplemented from joedb::Connection.

Definition at line 49 of file File_Connection.cpp.

◆ handshake()

int64_t joedb::Pullonly_Journal_Connection::handshake ( Readonly_Journal client_journal,
bool  content_check 
)
overridevirtual
Parameters
client_journalmay be used to check matching content
content_checkindicates whether matching content is tested
Return values
server_checkpoint

Reimplemented from joedb::Connection.

Definition at line 7 of file File_Connection.cpp.

◆ lock_pull()

int64_t joedb::Pullonly_Journal_Connection::lock_pull ( Writable_Journal client_journal,
std::chrono::milliseconds  wait 
)
overridevirtual
Return values
server_checkpoint

Reimplemented from joedb::Connection.

Definition at line 62 of file File_Connection.cpp.

◆ pull()

int64_t joedb::Pullonly_Journal_Connection::pull ( Writable_Journal client_journal,
std::chrono::milliseconds  wait 
)
overridevirtual
Parameters
client_journaljournal to pull into
waitduration during which the connection may wait for new data if the pull would otherwise be empty
Return values
server_checkpoint

Reimplemented from joedb::Connection.

Definition at line 36 of file File_Connection.cpp.

◆ push_until()

int64_t joedb::Pullonly_Journal_Connection::push_until ( Readonly_Journal client_journal,
const int64_t  from_checkpoint,
const int64_t  until_checkpoint,
bool  unlock_after 
)
overridevirtual
Return values
server_checkpoint

Reimplemented from joedb::Connection.

Definition at line 73 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: