Class mdbx::cache_entry
ClassList > mdbx > cache_entry
Cache entry for the transparent read-your-writes caching, see txn::get_cached() andmdbx_cache_get() .More...
#include <mdbx.h++>
Inherits the following classes: MDBX_cache_entry_t
Public Attributes inherited from MDBX_cache_entry_t
| Type | Name |
|---|---|
| uint64_t | last_confirmed_txnid |
| uint32_t | length |
| size_t | offset |
| uint64_t | trunk_txnid |
Public Functions
| Type | Name |
|---|---|
| cache_entry () noexcept |
|
| cache_entry (const cache_entry &) noexcept |
|
| cache_entry (cache_entry && other) noexcept |
|
| constexpr | cache_entry (const MDBX_cache_entry_t & ce) noexcept |
| uint64_t | last_confirmed () noexcept const Returns the recent transaction/MVCC-snapshot ID wherein the entry was checked and confirmed. |
| bool | notfound () noexcept const Returns true if the entry caches the "key not found" state. |
| cache_entry & | operator= (const cache_entry &) noexcept |
| cache_entry & | operator= (const MDBX_cache_entry_t & ce) noexcept |
| void | reset () noexcept Initializes the cache entry to the "no cached info" state. |
| uint64_t | transaction_id () noexcept const Returns the transaction/MVCC-snapshot ID of the internal structure that holds the cached data. |
Detailed Description
A value type wrapping MDBX_cache_entry_t. Each entry is associated with a key and holds a lightweight "version stamp" plus the offset of the cached value inside the memory-mapped database file, so subsequent lookups stop as soon as they reach an unmodified page.
An entry must be initialized (reset()) before the first use. Entries may be placed in shared memory and used by multiple processes, though libmdbx does not provide such interaction management yet.
Public Functions Documentation
function cache_entry [1/4]
inline mdbx::cache_entry::cache_entry () noexcept
function cache_entry [2/4]
mdbx::cache_entry::cache_entry (
const cache_entry &
) noexcept
function cache_entry [3/4]
inline mdbx::cache_entry::cache_entry (
cache_entry && other
) noexcept
function cache_entry [4/4]
inline constexpr mdbx::cache_entry::cache_entry (
const MDBX_cache_entry_t & ce
) noexcept
function last_confirmed
Returns the recent transaction/MVCC-snapshot ID wherein the entry was checked and confirmed.
inline uint64_t mdbx::cache_entry::last_confirmed () noexcept const
function notfound
Returns true if the entry caches the "key not found" state.
inline bool mdbx::cache_entry::notfound () noexcept const
function operator=
cache_entry & mdbx::cache_entry::operator= (
const cache_entry &
) noexcept
function operator=
inline cache_entry & mdbx::cache_entry::operator= (
const MDBX_cache_entry_t & ce
) noexcept
function reset
Initializes the cache entry to the "no cached info" state.
inline void mdbx::cache_entry::reset () noexcept
function transaction_id
Returns the transaction/MVCC-snapshot ID of the internal structure that holds the cached data.
inline uint64_t mdbx::cache_entry::transaction_id () noexcept const
Friends Documentation
friend operator!=
inline bool mdbx::cache_entry::operator!= (
const cache_entry & a,
const cache_entry & b
) noexcept
friend operator==
inline bool mdbx::cache_entry::operator== (
const cache_entry & a,
const cache_entry & b
) noexcept
The documentation for this class was generated from the following file docs/mdbx.h++