Classes | Public Member Functions | Protected Member Functions

dtn::core::MemoryBundleStorage Class Reference

#include <MemoryBundleStorage.h>

Inherits dtn::core::BundleStorage, dtn::core::EventReceiver, dtn::daemon::IntegratedComponent, and dtn::data::BundleList.

Collaboration diagram for dtn::core::MemoryBundleStorage:
Collaboration graph
[legend]

List of all members.

Classes

struct  CMP_BUNDLE_PRIORITY

Public Member Functions

 MemoryBundleStorage (size_t maxsize=0)
virtual ~MemoryBundleStorage ()
virtual void store (const dtn::data::Bundle &bundle)
virtual dtn::data::Bundle get (const dtn::data::BundleID &id)
virtual const std::list
< dtn::data::MetaBundle
get (BundleFilterCallback &cb)
void remove (const dtn::data::BundleID &id)
dtn::data::MetaBundle remove (const ibrcommon::BloomFilter &filter)
void clear ()
bool empty ()
unsigned int count ()
size_t size () const
void releaseCustody (const dtn::data::EID &custodian, const dtn::data::BundleID &id)
void raiseEvent (const Event *evt)
virtual const std::string getName () const

Protected Member Functions

virtual void componentUp ()
virtual void componentDown ()
virtual void eventBundleExpired (const ExpiringBundle &b)

Detailed Description

Definition at line 24 of file MemoryBundleStorage.h.


Constructor & Destructor Documentation

dtn::core::MemoryBundleStorage::MemoryBundleStorage ( size_t  maxsize = 0  ) 

Definition at line 21 of file MemoryBundleStorage.cpp.

dtn::core::MemoryBundleStorage::~MemoryBundleStorage (  )  [virtual]

Definition at line 26 of file MemoryBundleStorage.cpp.


Member Function Documentation

void dtn::core::MemoryBundleStorage::clear (  )  [virtual]
See also:
BundleStorage::clear()

Reimplemented from dtn::data::BundleList.

Definition at line 221 of file MemoryBundleStorage.cpp.

void dtn::core::MemoryBundleStorage::componentDown (  )  [protected, virtual]

Definition at line 35 of file MemoryBundleStorage.cpp.

References dtn::core::TimeEvent::className, and dtn::core::EventReceiver::unbindEvent().

Here is the call graph for this function:

void dtn::core::MemoryBundleStorage::componentUp (  )  [protected, virtual]

Definition at line 30 of file MemoryBundleStorage.cpp.

References dtn::core::EventReceiver::bindEvent(), and dtn::core::TimeEvent::className.

Here is the call graph for this function:

unsigned int dtn::core::MemoryBundleStorage::count (  ) 
See also:
BundleStorage::count()

Definition at line 70 of file MemoryBundleStorage.cpp.

bool dtn::core::MemoryBundleStorage::empty (  ) 
See also:
BundleStorage::empty()

Definition at line 58 of file MemoryBundleStorage.cpp.

void dtn::core::MemoryBundleStorage::eventBundleExpired ( const ExpiringBundle b  )  [protected, virtual]
const std::list< dtn::data::MetaBundle > dtn::core::MemoryBundleStorage::get ( BundleFilterCallback &  cb  )  [virtual]
dtn::data::Bundle dtn::core::MemoryBundleStorage::get ( const dtn::data::BundleID id  )  [virtual]

This method returns a specific bundle which is identified by its id.

Parameters:
id The ID of the bundle to return.
Returns:
A bundle object of the

Definition at line 97 of file MemoryBundleStorage.cpp.

References IBRCOMMON_LOGGER, and ibrcommon::Exception::what().

Here is the call graph for this function:

const std::string dtn::core::MemoryBundleStorage::getName (  )  const [virtual]
See also:
Component::getName()

Definition at line 53 of file MemoryBundleStorage.cpp.

void dtn::core::MemoryBundleStorage::raiseEvent ( const Event evt  ) 

This method is used to receive events.

Parameters:
evt 

Definition at line 40 of file MemoryBundleStorage.cpp.

References dtn::data::BundleList::expire(), dtn::core::TimeEvent::getAction(), and dtn::core::TimeEvent::getTimestamp().

Here is the call graph for this function:

void dtn::core::MemoryBundleStorage::releaseCustody ( const dtn::data::EID custodian,
const dtn::data::BundleID id 
)
See also:
BundleStorage::releaseCustody();

Definition at line 64 of file MemoryBundleStorage.cpp.

dtn::data::MetaBundle dtn::core::MemoryBundleStorage::remove ( const ibrcommon::BloomFilter filter  ) 

Remove one bundles which match this filter

Parameters:
filter 
Returns:
The bundle meta data of the removed bundle.

Definition at line 186 of file MemoryBundleStorage.cpp.

References ibrcommon::BloomFilter::contains(), dtn::data::DefaultSerializer::getLength(), remove(), and dtn::data::Bundle::toString().

Here is the call graph for this function:

void dtn::core::MemoryBundleStorage::remove ( const dtn::data::BundleID id  ) 

This method deletes a specific bundle in the storage. No reports will be generated here.

Parameters:
id The ID of the bundle to remove.

Definition at line 154 of file MemoryBundleStorage.cpp.

References dtn::data::DefaultSerializer::getLength(), and size().

Referenced by remove().

Here is the call graph for this function:

size_t dtn::core::MemoryBundleStorage::size (  )  const

Get the current size

Definition at line 216 of file MemoryBundleStorage.cpp.

Referenced by remove(), and store().

void dtn::core::MemoryBundleStorage::store ( const dtn::data::Bundle bundle  )  [virtual]

Stores a bundle in the storage.

Parameters:
bundle The bundle to store.

Definition at line 123 of file MemoryBundleStorage.cpp.

References dtn::data::BundleList::add(), dtn::data::DefaultSerializer::getLength(), IBRCOMMON_LOGGER_DEBUG, size(), and dtn::data::Bundle::toString().

Here is the call graph for this function:


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