Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
tpl_paged_tree_durability.H File Reference

Helpers for durable paged-tree files. More...

#include <algorithm>
#include <array>
#include <cerrno>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <filesystem>
#include <fstream>
#include <mutex>
#include <string>
#include <type_traits>
#include <vector>
#include <ah-errors.H>
Include dependency graph for tpl_paged_tree_durability.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::detail::Pid_File_Lock
 
struct  Aleph::detail::Pid_File_Lock::Local_Lock_State
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 
namespace  Aleph::detail
 

Enumerations

enum class  Aleph::Paged_File_Open_Mode : std::uint8_t { Aleph::Read_Write , Aleph::Read_Only }
 Open mode for paged persistent tree files. More...
 
enum class  Aleph::detail::Pid_File_Lock_Mode : std::uint8_t { Aleph::detail::Shared , Aleph::detail::Exclusive }
 

Functions

void Aleph::detail::sync_parent_directory (const std::string &path, const char *kind)
 
void Aleph::detail::sync_file_by_path (const std::string &path, const char *kind)
 
void Aleph::detail::sync_file_descriptor (const int fd, const std::string &path, const char *kind)
 
void Aleph::detail::remove_file_if_exists (const std::string &path, const char *kind)
 
void Aleph::detail::rename_file_atomic (const std::string &src, const std::string &dst, const char *kind)
 
void Aleph::detail::copy_file_contents (const std::string &src, const std::string &dst, const char *kind)
 
std::uint32_t Aleph::detail::crc32_begin () noexcept
 
std::uint32_t Aleph::detail::crc32_add_bytes (std::uint32_t crc, const void *data, const size_t size) noexcept
 
template<typename T >
std::uint32_t Aleph::detail::crc32_add (std::uint32_t crc, const T &value) noexcept
 
std::uint32_t Aleph::detail::crc32_finish (const std::uint32_t crc) noexcept
 
long long Aleph::detail::current_process_id () noexcept
 
bool Aleph::detail::process_is_alive (const long long pid) noexcept
 

Detailed Description

Helpers for durable paged-tree files.

This header centralizes process locking, parent-directory syncing, and other low-level durability helpers shared by the paged persistent tree implementations.

Definition in file tpl_paged_tree_durability.H.