#include <fso_cachefile.h>
◆ CacheChunkList()
CacheChunkList::CacheChunkList |
( |
| ) |
|
◆ ~CacheChunkList()
CacheChunkList::~CacheChunkList |
( |
| ) |
|
◆ AddChunk()
void CacheChunkList::AddChunk |
( |
uint64_t |
start, |
|
|
int64_t |
len |
|
) |
| |
Add a chunk to the list
- Parameters
-
start | chunk's start |
len | chunk's length |
◆ ForEach()
void CacheChunkList::ForEach |
( |
void(*)(uint64_t start, int64_t len, void *usr_data_cb) |
foreachcb, |
|
|
void * |
usr_data = NULL |
|
) |
| |
For each function
- Parameters
-
foreachcb | for each callback |
usr_data | user closure to be passed to the callback |
◆ Length()
uint CacheChunkList::Length |
( |
| ) |
|
|
inline |
Get the number of list elements
- Returns
- number of list elements
◆ pop()
Pop the last element of the list
- Returns
- the last added element
◆ ReadLock()
void CacheChunkList::ReadLock |
( |
| ) |
|
Acquire the lock object's for reading
◆ ReadUnlock()
void CacheChunkList::ReadUnlock |
( |
| ) |
|
Release the lock object's (acquired for reading)
◆ ReverseCheck()
bool CacheChunkList::ReverseCheck |
( |
uint64_t |
start, |
|
|
int64_t |
len |
|
) |
| |
Check if a chunk is in the list given its start and length
- Parameters
-
start | chunk's start |
len | chunk's length |
- Returns
- true if the chunk is contained in the list and false otherwise
◆ ReverseRemove()
void CacheChunkList::ReverseRemove |
( |
uint64_t |
start, |
|
|
int64_t |
len |
|
) |
| |
Remove the corresponding element (searched from last to first)
- Parameters
-
start | chunk's start |
len | chunk's length |
◆ WriteLock()
void CacheChunkList::WriteLock |
( |
| ) |
|
Acquire the lock object's for writing
◆ WriteUnlock()
void CacheChunkList::WriteUnlock |
( |
| ) |
|
Release the lock object's (acquired for writing)
The documentation for this class was generated from the following files: