maph 1.0.0 High-Performance Memory-Mapped Key-Value Database with O(1) Lookups

Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
maph::HybridMaph Class Reference

`#include <maph_hybrid.hpp>`

Collaboration diagram for maph::HybridMaph:

## Classes
struct | Stats

## Public Member Functions
std::string | get_static (const std::string &key) const
bool | set_static (const std::string &key, const std::string &value, uint32_t ttl_seconds=0)
std::string | get (const std::string &key) const
bool | set (const std::string &key, const std::string &value, uint32_t ttl_seconds=0)
bool | remove (const std::string &key)
void | expire_cleanup ()
Stats | get_stats () const
void | build_static_set (const std::vector< std::string > &static_keys, const std::vector< std::string > &static_values)

## Static Public Member Functions
static std::unique_ptr< HybridMaph > | create (const std::string &path, size_t total_slots, size_t static_slots=0)

## Detailed Description

Definition at line 60 of file maph_hybrid.hpp.

## Class Documentation

## ◆ maph::HybridMaph::Stats

struct maph::HybridMaph::Stats

Definition at line 307 of file maph_hybrid.hpp.

Collaboration diagram for maph::HybridMaph::Stats:

Class Members
size_t | avg_probe_distance |
size_t | dynamic_slots |
size_t | expired |
double | load_factor |
size_t | static_slots |
size_t | total_slots |
size_t | used_dynamic |
size_t | used_static |

## Member Function Documentation

## ◆ build_static_set()

void maph::HybridMaph::build_static_set | ( | const std::vector< std::string > & | static_keys,
|  | const std::vector< std::string > & | static_values
| ) |  |
| inline

Definition at line 341 of file maph_hybrid.hpp.

References set_static().

Here is the call graph for this function:

## ◆ create()

static std::unique_ptr< HybridMaph > maph::HybridMaph::create | ( | const std::string & | path,
|  | size_t | total_slots,
|  | size_t | static_slots = `0`
| ) |  |
| inline static

Definition at line 84 of file maph_hybrid.hpp.

References maph::HybridHeader::num_dynamic, maph::HybridHeader::num_slots, maph::HybridHeader::num_static, and maph::open().

Here is the call graph for this function:

## ◆ expire_cleanup()

void maph::HybridMaph::expire_cleanup | ( |  | ) |
| inline

Definition at line 287 of file maph_hybrid.hpp.

References maph::HybridSlot::expires_at, maph::HybridSlot::key_hash, maph::HybridHeader::num_dynamic, maph::HybridHeader::num_slots, maph::HybridSlot::TOMBSTONE, and maph::HybridSlot::version.

## ◆ get()

std::string maph::HybridMaph::get | ( | const std::string & | key | ) | const
| inline

Definition at line 180 of file maph_hybrid.hpp.

References maph::HybridSlot::is_empty(), maph::HybridSlot::is_valid(), maph::HybridSlot::key_hash, maph::HybridHeader::num_slots, maph::HybridHeader::num_static, maph::HybridSlot::size, and maph::HybridSlot::value.

Here is the call graph for this function:

## ◆ get_static()

std::string maph::HybridMaph::get_static | ( | const std::string & | key | ) | const
| inline

Definition at line 133 of file maph_hybrid.hpp.

References maph::HybridSlot::is_valid(), maph::HybridSlot::key_hash, maph::HybridHeader::num_static, maph::HybridSlot::size, and maph::HybridSlot::value.

Here is the call graph for this function:

## ◆ get_stats()

Stats maph::HybridMaph::get_stats | ( |  | ) | const
| inline

Definition at line 318 of file maph_hybrid.hpp.

References maph::HybridHeader::num_slots, maph::HybridHeader::num_static, and maph::HybridMaph::Stats::total_slots.

## ◆ remove()

bool maph::HybridMaph::remove | ( | const std::string & | key | ) |
| inline

Definition at line 276 of file maph_hybrid.hpp.

## ◆ set()

bool maph::HybridMaph::set | ( | const std::string & | key,
|  | const std::string & | value,
|  | uint32_t | ttl_seconds = `0`
| ) |  |
| inline

Definition at line 219 of file maph_hybrid.hpp.

References maph::HybridSlot::expires_at, maph::HybridHeader::generation, maph::HybridSlot::is_deleted(), maph::HybridSlot::is_empty(), maph::HybridSlot::key_hash, maph::HybridHeader::max_load_factor, maph::HybridSlot::MAX_VALUE_SIZE, maph::HybridHeader::num_dynamic, maph::HybridHeader::num_slots, maph::HybridHeader::num_static, maph::HybridSlot::size, maph::HybridSlot::value, and maph::HybridSlot::version.

Here is the call graph for this function:

## ◆ set_static()

bool maph::HybridMaph::set_static | ( | const std::string & | key,
|  | const std::string & | value,
|  | uint32_t | ttl_seconds = `0`
| ) |  |
| inline

Definition at line 149 of file maph_hybrid.hpp.

References maph::HybridSlot::expires_at, maph::HybridHeader::generation, maph::HybridSlot::key_hash, maph::HybridSlot::MAX_VALUE_SIZE, maph::HybridHeader::num_static, maph::HybridSlot::size, maph::HybridSlot::value, and maph::HybridSlot::version.

Referenced by build_static_set().

Here is the caller graph for this function:

The documentation for this class was generated from the following file:

- include/maph/maph_hybrid.hpp