#include <FileBlockCache.h>
|
| | FileBlockCache (int64_t min_memory, int64_t max_memory, bool compressed) |
| |
| | ~FileBlockCache () |
| |
| bool | compressed () |
| |
| bool | checkout (int file_id, uint64_t file_offset, uint8_t **blockp, uint32_t *lengthp) |
| |
| void | checkin (int file_id, uint64_t file_offset) |
| |
| bool | insert (int file_id, uint64_t file_offset, uint8_t *block, uint32_t length, const EventPtr &event, bool checkout) |
| |
| bool | contains (int file_id, uint64_t file_offset) |
| |
| void | increase_limit (int64_t amount) |
| |
| int64_t | decrease_limit (int64_t amount) |
| | Lowers the memory limit. More...
|
| |
| int64_t | get_limit () |
| |
| void | cap_memory_use () |
| | Sets limit to memory currently used, it will not reduce the limit below min_memory. More...
|
| |
| int64_t | memory_used () |
| |
| int64_t | available () |
| |
| void | get_stats (uint64_t *max_memoryp, uint64_t *available_memoryp, uint64_t *accessesp, uint64_t *hitsp) |
| |
|
| static int64_t | make_key (int file_id, uint64_t file_offset) |
| |
Definition at line 40 of file FileBlockCache.h.
| Hypertable::FileBlockCache::FileBlockCache |
( |
int64_t |
min_memory, |
|
|
int64_t |
max_memory, |
|
|
bool |
compressed |
|
) |
| |
|
inline |
| FileBlockCache::~FileBlockCache |
( |
| ) |
|
| int64_t Hypertable::FileBlockCache::available |
( |
| ) |
|
|
inline |
| void Hypertable::FileBlockCache::cap_memory_use |
( |
| ) |
|
|
inline |
Sets limit to memory currently used, it will not reduce the limit below min_memory.
Definition at line 82 of file FileBlockCache.h.
| void FileBlockCache::checkin |
( |
int |
file_id, |
|
|
uint64_t |
file_offset |
|
) |
| |
| bool FileBlockCache::checkout |
( |
int |
file_id, |
|
|
uint64_t |
file_offset, |
|
|
uint8_t ** |
blockp, |
|
|
uint32_t * |
lengthp |
|
) |
| |
| bool Hypertable::FileBlockCache::compressed |
( |
| ) |
|
|
inline |
| bool FileBlockCache::contains |
( |
int |
file_id, |
|
|
uint64_t |
file_offset |
|
) |
| |
| int64_t FileBlockCache::decrease_limit |
( |
int64_t |
amount | ) |
|
Lowers the memory limit.
This method will free memory if necessary to bring the limit down by 'amount' It will not reduce the limit below min_memory
- Parameters
-
| amount | Amount to reduce limit by |
- Returns
- amount of memory deallocated by the method
Definition at line 146 of file FileBlockCache.cc.
| int64_t Hypertable::FileBlockCache::get_limit |
( |
| ) |
|
|
inline |
| static int Hypertable::FileBlockCache::get_next_file_id |
( |
| ) |
|
|
inlinestatic |
| void FileBlockCache::get_stats |
( |
uint64_t * |
max_memoryp, |
|
|
uint64_t * |
available_memoryp, |
|
|
uint64_t * |
accessesp, |
|
|
uint64_t * |
hitsp |
|
) |
| |
| void FileBlockCache::increase_limit |
( |
int64_t |
amount | ) |
|
| bool FileBlockCache::insert |
( |
int |
file_id, |
|
|
uint64_t |
file_offset, |
|
|
uint8_t * |
block, |
|
|
uint32_t |
length, |
|
|
const EventPtr & |
event, |
|
|
bool |
checkout |
|
) |
| |
| static int64_t Hypertable::FileBlockCache::make_key |
( |
int |
file_id, |
|
|
uint64_t |
file_offset |
|
) |
| |
|
inlinestaticprivate |
| int64_t FileBlockCache::make_room |
( |
int64_t |
amount | ) |
|
|
private |
| int64_t Hypertable::FileBlockCache::memory_used |
( |
| ) |
|
|
inline |
| uint64_t Hypertable::FileBlockCache::m_accesses |
|
private |
| int64_t Hypertable::FileBlockCache::m_available |
|
private |
| bool Hypertable::FileBlockCache::m_compressed |
|
private |
| uint64_t Hypertable::FileBlockCache::m_hits |
|
private |
| int64_t Hypertable::FileBlockCache::m_limit |
|
private |
| int64_t Hypertable::FileBlockCache::m_max_memory |
|
private |
| int64_t Hypertable::FileBlockCache::m_min_memory |
|
private |
| std::mutex Hypertable::FileBlockCache::m_mutex |
|
private |
| atomic< int > FileBlockCache::ms_next_file_id {0} |
|
staticprivate |
The documentation for this class was generated from the following files: