Joedb 10.0.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Journal_Construction_Lock.h
Go to the documentation of this file.
1#ifndef joedb_Journal_Construction_Lock_declared
2#define joedb_Journal_Construction_Lock_declared
3
5
6namespace joedb
7{
8 /// @ingroup journal
9 enum class Recovery
10 {
11 none = 0, ///< default: fail if file size > checkpoint
12 ignore_header = 1, ///< use file size as checkpoint
13 overwrite = 2 ///< allow overwriting an uncheckpointed tail
14 };
15
16 /// @ingroup journal
18 {
19 friend class Writable_Journal;
20
21 private:
22 bool for_writable_journal = false;
23 Journal_Construction_Lock &set_for_writable_journal()
24 {
25 for_writable_journal = true;
26 return *this;
27 }
28
29 public:
32 const int64_t size;
33
34 bool is_for_writable_journal() const {return for_writable_journal;}
35
37 (
40 );
41
44
46 };
47}
48
49#endif
Journal_Construction_Lock(const Journal_Construction_Lock &)=delete
Journal_Construction_Lock & operator=(const Journal_Construction_Lock &)=delete
@ none
default: fail if file size > checkpoint
@ overwrite
allow overwriting an uncheckpointed tail
@ ignore_header
use file size as checkpoint
Definition Blob.h:7