filesaver
filesaver::LevelDbStorageService Class Reference

LevelDB implementation of the size cache. More...

#include <LevelDbStorageService.h>

Inheritance diagram for filesaver::LevelDbStorageService:
filesaver::StorageService

Public Member Functions

 INJECT (LevelDbStorageService(const std::string &dbFilename))
 
 ~LevelDbStorageService () override
 
bool isDatabaseOk ()
 
int createTables () override
 
int insertEntry (const FileSizePair &pair) override
 
int insertEntryBatch (const std::vector< FileSizePair > &pairs, size_t start, size_t end) override
 
std::optional< FileSizePairfetchEntry (const std::string &filepath) override
 
- Public Member Functions inherited from filesaver::StorageService
virtual ~StorageService ()
 

Detailed Description

LevelDB implementation of the size cache.

Definition at line 21 of file LevelDbStorageService.h.

Constructor & Destructor Documentation

◆ ~LevelDbStorageService()

filesaver::LevelDbStorageService::~LevelDbStorageService ( )
override

Definition at line 29 of file LevelDbStorageService.cpp.

Member Function Documentation

◆ createTables()

int filesaver::LevelDbStorageService::createTables ( )
overridevirtual

Perform setup for this storage back-end

Implements filesaver::StorageService.

Definition at line 41 of file LevelDbStorageService.cpp.

◆ fetchEntry()

std::optional< FileSizePair > filesaver::LevelDbStorageService::fetchEntry ( const std::string &  filepath)
overridevirtual

Fetch an entry from the store

Implements filesaver::StorageService.

Definition at line 82 of file LevelDbStorageService.cpp.

◆ INJECT()

filesaver::LevelDbStorageService::INJECT ( LevelDbStorageService(const std::string &dbFilename)  )

◆ insertEntry()

int filesaver::LevelDbStorageService::insertEntry ( const FileSizePair pair)
overridevirtual

Insert an entry onto the store

Implements filesaver::StorageService.

Definition at line 46 of file LevelDbStorageService.cpp.

◆ insertEntryBatch()

int filesaver::LevelDbStorageService::insertEntryBatch ( const std::vector< FileSizePair > &  pairs,
size_t  start,
size_t  end 
)
overridevirtual

Implements filesaver::StorageService.

Definition at line 61 of file LevelDbStorageService.cpp.

◆ isDatabaseOk()

bool filesaver::LevelDbStorageService::isDatabaseOk ( )

Definition at line 36 of file LevelDbStorageService.cpp.


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