#include <disk_storage.h>
Public Member Functions | |
DiskStorage (const boost::filesystem::path &_root) | |
virtual void | get (const boost::filesystem::path &path, ByteVec &result) |
virtual void | getAsync (const boost::filesystem::path &path, GetCallback callback) |
virtual void | getBatch (const std::vector< boost::filesystem::path > &paths, std::vector< ByteVec > &results) |
virtual std::string | getType () |
virtual void | putAsync (const boost::filesystem::path &path, const ByteVec &data, PutCallback callback) |
virtual void | putBatch (const std::vector< boost::filesystem::path > &paths, std::vector< ByteVec > &data) |
~DiskStorage () | |
Private Member Functions | |
void | readerFunction (const boost::filesystem::path &path, GetCallback callback) |
void | writerFunction (const boost::filesystem::path &path, const ByteVec &data, PutCallback callback) |
Private Attributes | |
FunctionCaller | function_caller |
boost::filesystem::path | root |
Definition at line 14 of file disk_storage.h.
megatree::DiskStorage::DiskStorage | ( | const boost::filesystem::path & | _root | ) | [inline] |
Definition at line 17 of file disk_storage.h.
megatree::DiskStorage::~DiskStorage | ( | ) | [inline] |
Definition at line 18 of file disk_storage.h.
void megatree::DiskStorage::get | ( | const boost::filesystem::path & | path, |
ByteVec & | result | ||
) | [virtual] |
Reimplemented from megatree::Storage.
Definition at line 12 of file disk_storage.cpp.
void megatree::DiskStorage::getAsync | ( | const boost::filesystem::path & | path, |
GetCallback | callback | ||
) | [virtual] |
Implements megatree::Storage.
Definition at line 69 of file disk_storage.cpp.
void megatree::DiskStorage::getBatch | ( | const std::vector< boost::filesystem::path > & | paths, |
std::vector< ByteVec > & | results | ||
) | [virtual] |
Reimplemented from megatree::Storage.
Definition at line 28 of file disk_storage.cpp.
virtual std::string megatree::DiskStorage::getType | ( | ) | [inline, virtual] |
Implements megatree::Storage.
Definition at line 27 of file disk_storage.h.
void megatree::DiskStorage::putAsync | ( | const boost::filesystem::path & | path, |
const ByteVec & | data, | ||
PutCallback | callback | ||
) | [virtual] |
Implements megatree::Storage.
Definition at line 81 of file disk_storage.cpp.
void megatree::DiskStorage::putBatch | ( | const std::vector< boost::filesystem::path > & | paths, |
std::vector< ByteVec > & | data | ||
) | [virtual] |
Reimplemented from megatree::Storage.
Definition at line 36 of file disk_storage.cpp.
void megatree::DiskStorage::readerFunction | ( | const boost::filesystem::path & | path, |
GetCallback | callback | ||
) | [private] |
Definition at line 62 of file disk_storage.cpp.
void megatree::DiskStorage::writerFunction | ( | const boost::filesystem::path & | path, |
const ByteVec & | data, | ||
PutCallback | callback | ||
) | [private] |
Definition at line 75 of file disk_storage.cpp.
Definition at line 30 of file disk_storage.h.
boost::filesystem::path megatree::DiskStorage::root [private] |
Definition at line 27 of file disk_storage.h.