|
IBR-DTNSuite 0.6
|
#include <DataStorage.h>


Classes | |
| class | Callback |
| class | Container |
| class | DataNotAvailableException |
| class | Hash |
| class | istream |
| class | RemoveDataTask |
| class | StoreDataTask |
| class | Task |
Public Member Functions | |
| DataStorage (Callback &callback, const ibrcommon::File &path, size_t write_buffer=0, bool initialize=false) | |
| virtual | ~DataStorage () |
| const Hash | store (Container *data) |
| void | store (const Hash &hash, Container *data) |
| DataStorage::istream | retrieve (const Hash &hash) throw (DataNotAvailableException) |
| void | remove (const Hash &hash) |
| void | iterateAll () |
Protected Member Functions | |
| void | run () |
| bool | __cancellation () |
Definition at line 25 of file DataStorage.h.
| dtn::core::DataStorage::DataStorage | ( | Callback & | callback, |
| const ibrcommon::File & | path, | ||
| size_t | write_buffer = 0, |
||
| bool | initialize = false |
||
| ) |
Definition at line 79 of file DataStorage.cpp.
References ibrcommon::File::createDirectory(), ibrcommon::File::exists(), and ibrcommon::File::getFiles().

| dtn::core::DataStorage::~DataStorage | ( | ) | [virtual] |
Definition at line 105 of file DataStorage.cpp.
References ibrcommon::Queue< T >::abort(), ibrcommon::Queue< T >::getnpop(), and ibrcommon::JoinableThread::join().

| bool dtn::core::DataStorage::__cancellation | ( | ) | [protected, virtual] |
Reimplemented from ibrcommon::Thread.
Definition at line 173 of file DataStorage.cpp.
References ibrcommon::Queue< T >::abort().

| void dtn::core::DataStorage::iterateAll | ( | ) |
Definition at line 122 of file DataStorage.cpp.
References ibrcommon::File::getFiles(), and dtn::core::DataStorage::Callback::iterateDataStorage().
Referenced by dtn::core::SimpleBundleStorage::SimpleBundleStorage().

| void dtn::core::DataStorage::remove | ( | const Hash & | hash | ) |
Definition at line 168 of file DataStorage.cpp.
References ibrcommon::Queue< T >::push().
Referenced by dtn::core::SimpleBundleStorage::clear(), dtn::core::SimpleBundleStorage::eventBundleExpired(), dtn::core::SimpleBundleStorage::iterateDataStorage(), and dtn::core::SimpleBundleStorage::remove().

| DataStorage::istream dtn::core::DataStorage::retrieve | ( | const Hash & | hash | ) | throw (DataNotAvailableException) |
Definition at line 156 of file DataStorage.cpp.
References ibrcommon::File::exists(), and ibrcommon::File::get().

| void dtn::core::DataStorage::run | ( | ) | [protected, virtual] |
Abstract interface for thread context run method.
Implements ibrcommon::Thread.
Definition at line 179 of file DataStorage.cpp.
References dtn::core::DataStorage::Callback::eventDataStorageRemoved(), dtn::core::DataStorage::Callback::eventDataStorageRemoveFailed(), dtn::core::DataStorage::Callback::eventDataStorageStored(), dtn::core::DataStorage::Callback::eventDataStorageStoreFailed(), ibrcommon::File::exists(), ibrcommon::File::get(), ibrcommon::Queue< T >::getnpop(), ibrcommon::File::getPath(), ibrcommon::Semaphore::post(), ibrcommon::File::remove(), and store().

| void dtn::core::DataStorage::store | ( | const Hash & | hash, |
| DataStorage::Container * | data | ||
| ) |
Definition at line 139 of file DataStorage.cpp.
References ibrcommon::Queue< T >::push(), and ibrcommon::Semaphore::wait().

| const DataStorage::Hash dtn::core::DataStorage::store | ( | DataStorage::Container * | data | ) |
Definition at line 148 of file DataStorage.cpp.
Referenced by run(), and dtn::core::SimpleBundleStorage::store().