Class MetadataModule
Defined in File metadata_module.hpp
Class Documentation
-
class gkfs::metadata::MetadataModule
MetadataModule is a singleton class that holds global data structures for all metadata operations.
Public Functions
-
MetadataModule(MetadataModule const&) = delete
-
void operator=(MetadataModule const&) = delete
-
const std::shared_ptr<spdlog::logger> &log() const
-
const std::map<uint16_t, size_t> &append_offset_reserve() const
-
void append_offset_reserve_put(uint16_t merge_id, size_t offset)
Inserts entry into append_offset_reserve_.
- Parameters
merge_id – Merge ID
offset – Offset to reserve
-
size_t append_offset_reserve_get_and_erase(uint16_t merge_id)
Gets and erases entry from append_offset_reserve_.
- Parameters
merge_id – Merge ID
- Throws
std::out_of_range – if merge_id is not in append_offset_reserve_
- Returns
Offset reserved for merge_id
Public Static Functions
-
static inline MetadataModule *getInstance()
Get the MetadataModule singleton instance.
- Returns
MetadataModule instance
Public Static Attributes
-
static constexpr const char *LOGGER_NAME = "MetadataModule"
< Logger name
Private Functions
-
MetadataModule() = default
-
MetadataModule(MetadataModule const&) = delete