|
Joedb 10.2.3
The Journal-Only Embedded Database
|
Handle concurrent access to a joedb::Abstract_File using a joedb::Connection. More...
#include <tutorial/Client.h>


Public Member Functions | |
| Client (joedb::Abstract_File &file, joedb::Connection &connection=joedb::Connection::dummy, joedb::Content_Check content_check=joedb::Content_Check::fast, joedb::Recovery recovery=joedb::Recovery::none) | |
| const Database & | get_database () const |
| template<typename F > | |
| auto | transaction (F transaction) |
| Execute a write transaction. | |
Public Member Functions inherited from joedb::Writable_Client | |
| Writable_Client (Writable_Journal &journal, Connection &connection=Connection::dummy, Content_Check content_check=Content_Check::fast) | |
| void | touch () |
| 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 (int64_t until) override |
| virtual int64_t | push_if_ahead (int64_t until)=0 |
| int64_t | push_if_ahead () |
Public Member Functions inherited from joedb::Client | |
| Client (Readonly_Journal &journal, Connection &connection, Content_Check content_check) | |
| const Readonly_Journal & | get_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 |
| int64_t | push_if_ahead () |
| virtual | ~Client () |
Protected Member Functions | |
| void | read_journal () override |
Protected Member Functions inherited from joedb::Writable_Client | |
| template<typename F > | |
| auto | transaction (F f) |
Protected Member Functions inherited from joedb::Client | |
| int64_t | push (int64_t until, Unlock_Action unlock_action) |
| int64_t | push (Unlock_Action unlock_action) |
Friends | |
| class | Client_Lock |
Additional Inherited Members | |
Protected Attributes inherited from joedb::Client | |
| Readonly_Journal & | journal |
| Connection & | connection |
| int64_t | connection_checkpoint |
|
inline |
|
inline |
|
inlineoverrideprotectedvirtual |
Reimplemented from joedb::Client.
|
inline |
This function can be called with a lambda like this:
The transaction function locks and pulls the connection before executing the lambda, pushes and unlocks it after.
|
friend |