IBR-DTNSuite
0.10
|
#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 | has (const dtn::data::MetaBundle &m) 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 () |
void | 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 () |
dtn::data::Length | getSize (const dtn::data::MetaBundle &meta) throw (NoBundleFoundException) |
Public Member Functions inherited from dtn::data::BundleList::Listener | |
virtual | ~Listener ()=0 |
Protected Member Functions | |
virtual void | eventBundleExpired (const dtn::data::MetaBundle &b) throw () |
Definition at line 35 of file MetaStorage.h.
typedef priority_set::const_iterator dtn::storage::MetaStorage::const_iterator |
Definition at line 73 of file MetaStorage.h.
typedef priority_set::iterator dtn::storage::MetaStorage::iterator |
Definition at line 72 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 75 of file MetaStorage.h.
Referenced by dtn::storage::SimpleBundleStorage::clear(), dtn::storage::SimpleBundleStorage::eventDataStorageRemoved(), and getDistinctDestinations().
|
inline |
Definition at line 78 of file MetaStorage.h.
void dtn::storage::MetaStorage::clear | ( | ) | throw () |
Delete all bundles
Definition at line 142 of file MetaStorage.cpp.
References dtn::data::BundleList::clear().
Referenced by dtn::storage::SimpleBundleStorage::clear(), and dtn::storage::SimpleBundleStorage::componentDown().
bool dtn::storage::MetaStorage::empty | ( | ) | throw () |
Definition at line 127 of file MetaStorage.cpp.
References size().
Referenced by dtn::storage::SimpleBundleStorage::empty().
|
inline |
Definition at line 76 of file MetaStorage.h.
Referenced by dtn::storage::SimpleBundleStorage::clear(), dtn::storage::SimpleBundleStorage::eventDataStorageRemoved(), and getDistinctDestinations().
|
inline |
Definition at line 79 of file MetaStorage.h.
|
protectedvirtual |
Implements dtn::data::BundleList::Listener.
Definition at line 37 of file MetaStorage.cpp.
void dtn::storage::MetaStorage::expire | ( | const dtn::data::Timestamp & | timestamp | ) | throw () |
Definition at line 53 of file MetaStorage.cpp.
|
inline |
Definition at line 88 of file MetaStorage.h.
References dtn::data::BundleList::end(), and dtn::data::BundleList::find().
Referenced by dtn::storage::SimpleBundleStorage::get(), and dtn::storage::SimpleBundleStorage::remove().
const dtn::data::MetaBundle & dtn::storage::MetaStorage::find | ( | const ibrcommon::BloomFilter & | filter | ) | const throw (NoBundleFoundException) |
Definition at line 58 of file MetaStorage.cpp.
References dtn::data::BundleID::toString().
std::set< dtn::data::EID > dtn::storage::MetaStorage::getDistinctDestinations | ( | ) | const throw () |
Definition at line 76 of file MetaStorage.cpp.
References begin(), dtn::data::MetaBundle::destination, and end().
Referenced by dtn::storage::SimpleBundleStorage::getDistinctDestinations().
dtn::data::Length dtn::storage::MetaStorage::getSize | ( | const dtn::data::MetaBundle & | meta | ) | throw (NoBundleFoundException) |
Get the size of the bundle
Definition at line 150 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::eventDataStorageRemoved(), and dtn::storage::SimpleBundleStorage::eventDataStorageStoreFailed().
bool dtn::storage::MetaStorage::has | ( | const dtn::data::MetaBundle & | m | ) | const throw () |
Definition at line 47 of file MetaStorage.cpp.
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 122 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 115 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::remove().
void dtn::storage::MetaStorage::remove | ( | const dtn::data::MetaBundle & | meta | ) | throw () |
Definition at line 105 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 137 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 93 of file MetaStorage.cpp.
Referenced by dtn::storage::SimpleBundleStorage::iterateDataStorage().