Go to the documentation of this file.
17 #ifndef LINEAIRDB_DATABASE_H
18 #define LINEAIRDB_DATABASE_H
81 std::optional<CallbackType> precommit_clbk = std::nullopt);
129 void Fence() const noexcept;
155 const std::unique_ptr<Impl> db_pimpl_;
TxStatus
Definition: tx_status.h:25
std::function< void(const TxStatus)> CallbackType
Definition: database.h:60
Configuration and options for LineairDB instances.
Definition: config.h:30
void RequestCallbacks()
Requests executions of callback functions of already completed (committed or (aborted) transactions....
void Fence() const noexcept
Fence() waits termination of transactions which is currently in progress. You can execute transaction...
void ExecuteTransaction(ProcedureType proc, CallbackType commit_clbk, std::optional< CallbackType > precommit_clbk=std::nullopt)
Processes a transaction given by a transaction procedure proc, and afterwards process callback functi...
Definition: database.h:31
std::function< void(Transaction &)> ProcedureType
Definition: database.h:59
const Config GetConfig() const noexcept
Return the Config object set by constructor.
Database & operator=(const Database &)=delete
We adopt "the page model" [Vossen95] as the model of transaction processing. For each transaction,...
Definition: transaction.h:51
Database() noexcept
Construct a new Database object. Thread-safe. Note that a default-constructed Config object will be p...
bool EndTransaction(Transaction &tx, CallbackType clbk)
Terminates the transaction. If Transaction::Abort has not been called, LineairDB tries to commit tx.
void WaitForCheckpoint() const noexcept
WaitForCheckpoint Waits for the completion of the next checkpoint. Note that this method may take lon...
Transaction & BeginTransaction()
Creates a new transaction. Via this interface, the callee thread of this method can manipulate Lineai...