IBR-DTNSuite
0.12
|
#include <MetaStorage.h>
Classes | |
struct | CMP_BUNDLE_PRIORITY |
Public Types | |
typedef std::set < dtn::data::MetaBundle, CMP_BUNDLE_PRIORITY > | priority_set |
typedef priority_set::iterator | iterator |
typedef priority_set::const_iterator | const_iterator |
Public Member Functions | |
MetaStorage (dtn::data::BundleList::Listener *expire_listener) | |
virtual | ~MetaStorage () |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
bool | empty () throw () |
size_t | size () throw () |
bool | contains (const dtn::data::BundleID &id) const throw () |
void | expire (const dtn::data::Timestamp ×tamp) throw () |
template<class T > | |
const dtn::data::MetaBundle & | find (const T &id) const throw (NoBundleFoundException) |
const dtn::data::MetaBundle & | find (const ibrcommon::BloomFilter &filter) const throw (NoBundleFoundException) |
std::set< dtn::data::EID > | getDistinctDestinations () const throw () |
void | store (const dtn::data::MetaBundle &meta, const dtn::data::Length &space) throw () |
dtn::data::Length | remove (const dtn::data::MetaBundle &meta) throw () |
void | markRemoved (const dtn::data::MetaBundle &meta) throw () |
bool | isRemoved (const dtn::data::MetaBundle &meta) const throw () |
void | clear () throw () |
Definition at line 35 of file MetaStorage.h.
typedef priority_set::const_iterator dtn::storage::MetaStorage::const_iterator |
Definition at line 71 of file MetaStorage.h.
typedef priority_set::iterator dtn::storage::MetaStorage::iterator |
Definition at line 70 of file MetaStorage.h.
typedef std::set<dtn::data::MetaBundle, CMP_BUNDLE_PRIORITY> dtn::storage::MetaStorage::priority_set |
Definition at line 52 of file MetaStorage.h.
dtn::storage::MetaStorage::MetaStorage | ( | dtn::data::BundleList::Listener * | expire_listener) |
Definition at line 28 of file MetaStorage.cpp.
|
virtual |
Definition at line 33 of file MetaStorage.cpp.
|
inline |
Definition at line 73 of file MetaStorage.h.
Referenced by dtn::storage::SimpleBundleStorage::clear(), dtn::storage::SimpleBundleStorage::eventDataStorageRemoved(), and getDistinctDestinations().
|
inline |
Definition at line 76 of file MetaStorage.h.
void dtn::storage::MetaStorage::clear | ( | ) | ||
throw | ( | |||
) |
Delete all bundles
Definition at line 148 of file MetaStorage.cpp.
References dtn::data::BundleList::clear().
Referenced by dtn::storage::SimpleBundleStorage::componentDown().
bool dtn::storage::MetaStorage::contains | ( | const dtn::data::BundleID & | id) | const | |
throw | ( | ||||
) |
Definition at line 37 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::contains().
bool dtn::storage::MetaStorage::empty | ( | ) | ||
throw | ( | |||
) |
Definition at line 133 of file MetaStorage.cpp.
References size().
Referenced by dtn::storage::SimpleBundleStorage::empty().
|
inline |
Definition at line 74 of file MetaStorage.h.
Referenced by dtn::storage::SimpleBundleStorage::clear(), dtn::storage::SimpleBundleStorage::eventDataStorageRemoved(), and getDistinctDestinations().
|
inline |
Definition at line 77 of file MetaStorage.h.
void dtn::storage::MetaStorage::expire | ( | const dtn::data::Timestamp & | timestamp) | ||
throw | ( | ||||
) |
Definition at line 42 of file MetaStorage.cpp.
|
inline |
Definition at line 86 of file MetaStorage.h.
References dtn::data::BundleList::end(), and dtn::data::BundleList::find().
Referenced by dtn::storage::SimpleBundleStorage::get(), dtn::storage::SimpleBundleStorage::info(), and dtn::storage::SimpleBundleStorage::remove().
const dtn::data::MetaBundle & dtn::storage::MetaStorage::find | ( | const ibrcommon::BloomFilter & | filter) | const | |
throw | ( | NoBundleFoundException | |||
) |
Definition at line 47 of file MetaStorage.cpp.
References dtn::data::BundleID::isIn().
std::set< dtn::data::EID > dtn::storage::MetaStorage::getDistinctDestinations | ( | ) | const | |
throw | ( | |||
) |
Definition at line 65 of file MetaStorage.cpp.
References begin(), dtn::data::MetaBundle::destination, and end().
Referenced by dtn::storage::SimpleBundleStorage::getDistinctDestinations().
bool dtn::storage::MetaStorage::isRemoved | ( | const dtn::data::MetaBundle & | meta) | const | |
throw | ( | ||||
) |
Return true, if the bundle is already marked as removed
Definition at line 128 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::remove().
void dtn::storage::MetaStorage::markRemoved | ( | const dtn::data::MetaBundle & | meta) | ||
throw | ( | ||||
) |
Mark a bundle as removed. Such a bundle is still reachable using find(id) and getSize()
Definition at line 121 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::remove().
dtn::data::Length dtn::storage::MetaStorage::remove | ( | const dtn::data::MetaBundle & | meta) | ||
throw | ( | ||||
) |
Remove a data entry completely and returns the number of released bytes.
Definition at line 94 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::eventDataStorageRemoved(), and dtn::storage::SimpleBundleStorage::eventDataStorageStoreFailed().
dtn::data::Size dtn::storage::MetaStorage::size | ( | ) | ||
throw | ( | |||
) |
Definition at line 143 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::componentUp(), dtn::storage::SimpleBundleStorage::count(), and empty().
void dtn::storage::MetaStorage::store | ( | const dtn::data::MetaBundle & | meta, |
const dtn::data::Length & | space | ||
) | |||
throw | ( | ||
) |
Definition at line 82 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::iterateDataStorage().