|
IBR-DTN
1.0.0
|
#include <DataStorage.h>


Classes | |
| class | Callback |
| class | Container |
| class | DataNotAvailableException |
| class | Hash |
| class | istream |
Public Member Functions | |
| DataStorage (Callback &callback, const ibrcommon::File &path, unsigned int 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 | wait () |
| void | iterateAll () |
| void | reset () |
| void | setFaulty (bool mode) |
Protected Member Functions | |
| void | run () throw () |
| void | __cancellation () throw () |
Definition at line 41 of file DataStorage.h.
| dtn::storage::DataStorage::DataStorage | ( | Callback & | callback, |
| const ibrcommon::File & | path, | ||
| unsigned int | write_buffer = 0, |
||
| bool | initialize = false |
||
| ) |
Definition at line 89 of file DataStorage.cpp.
|
virtual |
Definition at line 115 of file DataStorage.cpp.
|
protected | |||||||||||||
Definition at line 198 of file DataStorage.cpp.
| void dtn::storage::DataStorage::iterateAll | ( | ) |
iterate through all the data and call the iterateDataStorage() on each dataset
Definition at line 142 of file DataStorage.cpp.
References dtn::storage::DataStorage::Callback::iterateDataStorage().
Referenced by dtn::storage::SimpleBundleStorage::componentUp().

| void dtn::storage::DataStorage::remove | ( | const Hash & | hash | ) |
Definition at line 188 of file DataStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::clear(), dtn::storage::SimpleBundleStorage::iterateDataStorage(), and dtn::storage::SimpleBundleStorage::remove().
| void dtn::storage::DataStorage::reset | ( | ) |
reset the data storage
Definition at line 132 of file DataStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::componentDown().
| DataStorage::istream dtn::storage::DataStorage::retrieve | ( | const Hash & | hash | ) | |
| throw | ( | DataNotAvailableException | |||
| ) | |||||
Definition at line 176 of file DataStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::get().
|
protected | ||||||||||||||
Definition at line 203 of file DataStorage.cpp.
References dtn::storage::DataStorage::Callback::eventDataStorageRemoved(), dtn::storage::DataStorage::Callback::eventDataStorageRemoveFailed(), dtn::storage::DataStorage::Callback::eventDataStorageStored(), dtn::storage::DataStorage::Callback::eventDataStorageStoreFailed(), and store().

| void dtn::storage::DataStorage::setFaulty | ( | bool | mode | ) |
Set the storage to faulty. If set to true, each try to store a bundle will fail.
Definition at line 137 of file DataStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::setFaulty().
| const DataStorage::Hash dtn::storage::DataStorage::store | ( | DataStorage::Container * | data | ) |
Definition at line 168 of file DataStorage.cpp.
Referenced by run().
| void dtn::storage::DataStorage::store | ( | const Hash & | hash, |
| DataStorage::Container * | data | ||
| ) |
Definition at line 159 of file DataStorage.cpp.
| void dtn::storage::DataStorage::wait | ( | ) |
wait until all tasks are completed
Definition at line 193 of file DataStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::componentDown(), and dtn::storage::SimpleBundleStorage::wait().