Cache of skip records.
More...
#include <tkrzw_dbm_skip_impl.h>
◆ SkipRecordCache()
tkrzw::SkipRecordCache::SkipRecordCache |
( |
int32_t |
step_unit, |
|
|
int32_t |
capacity, |
|
|
int64_t |
num_records |
|
) |
| |
Constructor.
- Parameters
-
step_unit | The unit of stepping. |
capacity | The maximum number of records to contain. |
num_records | The number of records in the database. |
◆ ~SkipRecordCache()
tkrzw::SkipRecordCache::~SkipRecordCache |
( |
| ) |
|
◆ PrepareRecord()
bool tkrzw::SkipRecordCache::PrepareRecord |
( |
int64_t |
index, |
|
|
SkipRecord * |
record |
|
) |
| |
Prepare a record by reading the cache.
- Parameters
-
index | The index of the record. |
record | The pointer to the record object. |
- Returns
- True on success or false onfailure.
◆ Add()
void tkrzw::SkipRecordCache::Add |
( |
const SkipRecord & |
record | ) |
|
Add a record to the cache.
- Parameters
-
record | The record to store. |