CatapultServer
v0.5.0.1 (Elephant)
|
uint64_t get() const
Gets the index value.
Definition: IndexFile.cpp:36
RawFile open(OpenMode mode) const
Definition: IndexFile.cpp:62
Wrapper for low-level i/o operations on files.
Definition: RawFile.h:49
std::string m_filename
Definition: IndexFile.h:51
Index file containing a uint64_t value.
Definition: IndexFile.h:28
LockMode m_lockMode
Definition: IndexFile.h:52
Open file in read-only mode.
LockMode
Defines locking mode for the file.
Definition: RawFile.h:40
OpenMode
Defines mode of opening the file.
Definition: RawFile.h:28
void Write64(TIo &output, uint64_t value)
Writes value into output.
Definition: PodIoUtils.h:36
void set(uint64_t value)
Sets the index value to value.
Definition: IndexFile.cpp:41
IndexFile(const std::string &filename, LockMode lockMode=LockMode::File)
Creates an index file with name filename and file locking specified by lockMode.
Definition: IndexFile.cpp:27
bool exists() const
true if the index file exists.
Definition: IndexFile.cpp:32
Open file for both reading and writing.
Definition: AddressExtractionExtension.cpp:28
auto Read64(TIo &input)
Reads value from input.
Definition: PodIoUtils.h:66
uint64_t increment()
Increments the index value by one and returns the new value.
Definition: IndexFile.cpp:47