7#include "interface.hpp"
35template <
size_t MinWriteSize>
96#include "flash_io.hpp"
101#include "block_ops.hpp"
106#include "key_ops.hpp"
116#include "lifecycle.hpp"
数据库接口,提供键值存储和管理功能 (Database interface providing key-value storage and management).
适用于最小写入单元受限的 Flash 存储的数据库实现 (Database implementation for Flash storage with minimum write unit restri...
static constexpr uint32_t FLASH_HEADER
当前 raw 后端使用的块头签名 / Block-header signature used by the current raw backend
uint32_t block_size_
当前主块和备份块各自占用的物理块大小 / Physical block size occupied by each of the main and backup blocks
static constexpr uint32_t CHECKSUM_BYTE
当前 raw 后端使用的块尾校验常量 / Trailing checksum constant used by the current raw backend
LIBXR_PACKED_END size_t recycle_threshold_
查找时触发回收的失效键阈值 / Tombstone threshold that triggers recycle during lookup
Flash & flash_
当前后端绑定的 Flash 设备引用 / Reference to the Flash device bound to this backend
uint8_t write_buffer_[MinWriteSize]
复用的最小写入单元临时缓冲区 / Reused scratch buffer sized to one minimum write unit
Abstract base class representing a flash memory interface. 抽象基类,表示闪存接口。
static constexpr uint16_t LIBXR_DATABASE_VERSION
数据库存储格式版本号 (Database storage-format version).