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

Writable specialization of Client. More...

#include <joedb/concurrency/Writable_Client.h>

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

Public Member Functions

 Writable_Client (Writable_Journal &journal, Connection &connection, Content_Check content_check=Content_Check::quick)
 
void set_valid_data (bool b)
 Automatically write valid_data at every checkpoint (default = false)
 
void set_timestamp (bool b)
 Automatically write time stamp at every checkpoint (default = false)
 
void set_hard_checkpoint (bool b)
 Use hard checkpoints (default = false)
 
int64_t pull (std::chrono::milliseconds wait=std::chrono::milliseconds(0)) override
 
void pull_push ()
 
int64_t push_unlock ()
 
int64_t push_if_ahead () override
 
- Public Member Functions inherited from joedb::Client
 Client (Readonly_Journal &journal, Connection &connection, Content_Check content_check)
 
const Readonly_Journalget_journal () const
 
bool is_shared () const
 
bool is_pullonly () const
 
int64_t get_journal_checkpoint () const
 
std::string read_blob (Blob blob) const
 
int64_t get_connection_checkpoint () const
 
int64_t get_checkpoint_difference () const
 
virtual ~Client ()
 

Protected Member Functions

template<typename F >
auto transaction (F transaction)
 
- Protected Member Functions inherited from joedb::Client
virtual void read_journal ()
 
int64_t push (Unlock_Action unlock_action)
 

Friends

class Client_Lock
 

Additional Inherited Members

- Protected Attributes inherited from joedb::Client
Readonly_Journaljournal
 
Connectionconnection
 
int64_t connection_checkpoint
 

Detailed Description

Definition at line 12 of file Writable_Client.h.

Constructor & Destructor Documentation

◆ Writable_Client()

joedb::Writable_Client::Writable_Client ( Writable_Journal journal,
Connection connection,
Content_Check  content_check = Content_Check::quick 
)
inline

Definition at line 99 of file Writable_Client.h.

Member Function Documentation

◆ pull()

int64_t joedb::Writable_Client::pull ( std::chrono::milliseconds  wait = std::chrono::milliseconds(0))
inlineoverridevirtual
Parameters
waitindicates how long the connection may wait for new data
Return values
pull_sizenumber of bytes pulled

Implements joedb::Client.

Definition at line 120 of file Writable_Client.h.

◆ pull_push()

void joedb::Writable_Client::pull_push ( )
inline

Definition at line 142 of file Writable_Client.h.

◆ push_if_ahead()

int64_t joedb::Writable_Client::push_if_ahead ( )
inlineoverridevirtual

Implements joedb::Client.

Definition at line 152 of file Writable_Client.h.

◆ push_unlock()

int64_t joedb::Writable_Client::push_unlock ( )
inline

Definition at line 147 of file Writable_Client.h.

◆ set_hard_checkpoint()

void joedb::Writable_Client::set_hard_checkpoint ( bool  b)
inline

Definition at line 115 of file Writable_Client.h.

◆ set_timestamp()

void joedb::Writable_Client::set_timestamp ( bool  b)
inline

Definition at line 112 of file Writable_Client.h.

◆ set_valid_data()

void joedb::Writable_Client::set_valid_data ( bool  b)
inline

Definition at line 109 of file Writable_Client.h.

◆ transaction()

template<typename F >
auto joedb::Writable_Client::transaction ( transaction)
inlineprotected

Definition at line 17 of file Writable_Client.h.

Friends And Related Symbol Documentation

◆ Client_Lock

friend class Client_Lock
friend

Definition at line 14 of file Writable_Client.h.


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