Base pure virtual class that defines the DiskBuffer interface.
More...
#include <DiskBufferAbstract.hpp>
|
std::function< void(al::Socket *src)> | modified = [](al::Socket * ) {} |
|
Base pure virtual class that defines the DiskBuffer interface.
This class defines the interface to the filesystem for disk buffers
Definition at line 51 of file DiskBufferAbstract.hpp.
◆ cleanupRoundRobinFiles()
void tinc::DiskBufferAbstract::cleanupRoundRobinFiles |
( |
| ) |
|
|
inline |
◆ enableRoundRobin()
void tinc::DiskBufferAbstract::enableRoundRobin |
( |
int |
cacheSize = 0 , |
|
|
bool |
clearLocks = true |
|
) |
| |
|
inline |
◆ getBaseFileName()
std::string tinc::DiskBufferAbstract::getBaseFileName |
( |
| ) |
|
|
inline |
◆ getCurrentFileName()
std::string tinc::DiskBufferAbstract::getCurrentFileName |
( |
| ) |
|
|
inline |
getCurrentFileName
- Returns
This function is not thread safe. Needs to be called synchronously to any process functions
Definition at line 60 of file DiskBufferAbstract.hpp.
◆ getDocumentation()
std::string tinc::IdObject::getDocumentation |
( |
| ) |
const |
|
inherited |
◆ getFilenameForWriting()
std::string tinc::DiskBufferAbstract::getFilenameForWriting |
( |
| ) |
|
|
inline |
◆ getFullPath()
std::string tinc::DiskBufferAbstract::getFullPath |
( |
| ) |
|
|
inline |
◆ getId()
std::string tinc::IdObject::getId |
( |
| ) |
|
|
inherited |
◆ getRelativePath()
std::string tinc::DiskBufferAbstract::getRelativePath |
( |
| ) |
|
|
inline |
◆ getRootPath()
std::string tinc::DiskBufferAbstract::getRootPath |
( |
| ) |
|
|
inline |
◆ loadData()
virtual bool tinc::DiskBufferAbstract::loadData |
( |
std::string |
filename, |
|
|
bool |
notify = true |
|
) |
| |
|
pure virtual |
◆ makeFileName()
std::string tinc::DiskBufferAbstract::makeFileName |
( |
uint64_t |
index | ) |
|
|
inlineprotected |
◆ makeNextFileName()
std::string tinc::DiskBufferAbstract::makeNextFileName |
( |
| ) |
|
|
inlineprotected |
◆ registerNotifyCallback()
void tinc::DiskBufferAbstract::registerNotifyCallback |
( |
std::function< void(bool)> |
cb | ) |
|
|
inline |
register a function to be called when this object generates new buffer data
- Parameters
-
cb | If this object is registered with a TINC server or client, this function will only be called if the data creation is local to the node. |
When defining loadData(), these callbacks should only be called accodring to the notify argument.
Definition at line 125 of file DiskBufferAbstract.hpp.
◆ registerUpdateCallback()
void tinc::DiskBufferAbstract::registerUpdateCallback |
( |
std::function< void(bool)> |
cb | ) |
|
|
inline |
register a function to be called when this object generates new buffer data
- Parameters
-
cb | If this object is registered with a TINC server or client, this function will only be called if the data creation is local to the node. |
Definition at line 110 of file DiskBufferAbstract.hpp.
◆ setBaseFileName()
void tinc::DiskBufferAbstract::setBaseFileName |
( |
std::string |
name | ) |
|
|
inline |
◆ setDocumentation()
void tinc::IdObject::setDocumentation |
( |
const std::string & |
documentation | ) |
|
|
inherited |
◆ setId()
void tinc::IdObject::setId |
( |
std::string |
id | ) |
|
|
inherited |
◆ setRelativePath()
void tinc::DiskBufferAbstract::setRelativePath |
( |
std::string |
path | ) |
|
|
inline |
◆ setRootPath()
void tinc::DiskBufferAbstract::setRootPath |
( |
std::string |
path | ) |
|
|
inline |
◆ useFileLock()
void tinc::DiskBufferAbstract::useFileLock |
( |
bool |
use = true , |
|
|
bool |
clearLocks = true |
|
) |
| |
|
inline |
◆ m_distPath
◆ m_fileName
std::string tinc::DiskBufferAbstract::m_fileName |
|
protected |
◆ m_roundRobinCounter
uint64_t tinc::DiskBufferAbstract::m_roundRobinCounter {0} |
|
protected |
◆ m_roundRobinSize
uint64_t tinc::DiskBufferAbstract::m_roundRobinSize {0} |
|
protected |
◆ m_trigger
std::shared_ptr<al::ParameterString> tinc::DiskBufferAbstract::m_trigger |
|
protected |
◆ m_writeLock
std::mutex tinc::DiskBufferAbstract::m_writeLock |
|
protected |
◆ mDocumentation
std::string tinc::IdObject::mDocumentation |
|
protectedinherited |
◆ mId
std::string tinc::IdObject::mId |
|
protectedinherited |
◆ mNotifyCallbacks
std::vector<std::function<void(bool)> > tinc::DiskBufferAbstract::mNotifyCallbacks |
|
protected |
◆ modified
std::function<void(al::Socket *src)> tinc::IdObject::modified = [](al::Socket * ) {} |
|
inherited |
◆ mUpdateCallbacks
std::vector<std::function<void(bool)> > tinc::DiskBufferAbstract::mUpdateCallbacks |
|
protected |
The documentation for this class was generated from the following file: