IBR-DTNSuite  0.12
dtn::storage::MetaStorage Class Reference

#include <MetaStorage.h>

Collaboration diagram for dtn::storage::MetaStorage:
Collaboration graph

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 &timestamp) throw ()
 
template<class T >
const dtn::data::MetaBundlefind (const T &id) const throw (NoBundleFoundException)
 
const dtn::data::MetaBundlefind (const ibrcommon::BloomFilter &filter) const throw (NoBundleFoundException)
 
std::set< dtn::data::EIDgetDistinctDestinations () 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 ()
 

Detailed Description

Definition at line 35 of file MetaStorage.h.

Member Typedef Documentation

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.

Constructor & Destructor Documentation

dtn::storage::MetaStorage::MetaStorage ( dtn::data::BundleList::Listener expire_listener)

Definition at line 28 of file MetaStorage.cpp.

dtn::storage::MetaStorage::~MetaStorage ( )
virtual

Definition at line 33 of file MetaStorage.cpp.

Member Function Documentation

iterator dtn::storage::MetaStorage::begin ( )
inline
const_iterator dtn::storage::MetaStorage::begin ( ) const
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

const_iterator dtn::storage::MetaStorage::end ( ) const
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.

template<class T >
const dtn::data::MetaBundle& dtn::storage::MetaStorage::find ( const T &  id) const
throw (NoBundleFoundException
)
inline
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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 (
)
void dtn::storage::MetaStorage::store ( const dtn::data::MetaBundle meta,
const dtn::data::Length space 
)
throw (
)

The documentation for this class was generated from the following files: