IBR-DTNSuite  0.10
dtn::storage::MemoryBundleStorage Class Reference

#include <MemoryBundleStorage.h>

Inheritance diagram for dtn::storage::MemoryBundleStorage:
Inheritance graph
Collaboration diagram for dtn::storage::MemoryBundleStorage:
Collaboration graph

Public Member Functions

 MemoryBundleStorage (const dtn::data::Length maxsize=0)
 
virtual ~MemoryBundleStorage ()
 
virtual void store (const dtn::data::Bundle &bundle)
 
virtual dtn::data::Bundle get (const dtn::data::BundleID &id)
 
virtual void get (const BundleSelector &cb, BundleResult &result) throw (NoBundleFoundException, BundleSelectorException)
 
virtual const eid_set getDistinctDestinations ()
 
void remove (const dtn::data::BundleID &id)
 
dtn::data::MetaBundle remove (const ibrcommon::BloomFilter &filter)
 
void clear ()
 
bool empty ()
 
dtn::data::Size count ()
 
void releaseCustody (const dtn::data::EID &custodian, const dtn::data::BundleID &id)
 
void raiseEvent (const dtn::core::Event *evt) throw ()
 
virtual const std::string getName () const
 
- Public Member Functions inherited from dtn::storage::BundleStorage
virtual ~BundleStorage ()=0
 
void remove (const dtn::data::Bundle &b)
 
dtn::data::Length size () const
 
const dtn::data::EID acceptCustody (const dtn::data::MetaBundle &meta)
 
void rejectCustody (const dtn::data::MetaBundle &meta, dtn::data::CustodySignalBlock::REASON_CODE reason=dtn::data::CustodySignalBlock::NO_ADDITIONAL_INFORMATION)
 
void attach (dtn::storage::BundleIndex *index)
 
void detach (dtn::storage::BundleIndex *index)
 
virtual void wait ()
 
virtual void setFaulty (bool mode)
 
- Public Member Functions inherited from dtn::storage::BundleSeeker
virtual ~BundleSeeker ()
 
- Public Member Functions inherited from dtn::core::EventReceiver
virtual ~EventReceiver ()=0
 
- Public Member Functions inherited from dtn::daemon::IntegratedComponent
 IntegratedComponent ()
 
virtual ~IntegratedComponent ()
 
virtual void initialize () throw ()
 
virtual void startup () throw ()
 
virtual void terminate () throw ()
 
- Public Member Functions inherited from dtn::daemon::Component
virtual ~Component ()=0
 
- Public Member Functions inherited from dtn::data::BundleList::Listener
virtual ~Listener ()=0
 

Static Public Attributes

static const std::string TAG = "MemoryBundleStorage"
 

Protected Member Functions

virtual void componentUp () throw ()
 
virtual void componentDown () throw ()
 
virtual void eventBundleExpired (const dtn::data::MetaBundle &b) throw ()
 
- Protected Member Functions inherited from dtn::storage::BundleStorage
 BundleStorage (const dtn::data::Length &maxsize)
 
void allocSpace (const dtn::data::Length &size) throw (StorageSizeExeededException)
 
void freeSpace (const dtn::data::Length &size) throw ()
 
void clearSpace () throw ()
 
void eventBundleAdded (const dtn::data::MetaBundle &b) throw ()
 
void eventBundleRemoved (const dtn::data::BundleID &id) throw ()
 

Additional Inherited Members

- Public Types inherited from dtn::storage::BundleSeeker
typedef std::set< dtn::data::EIDeid_set
 
- Protected Attributes inherited from dtn::storage::BundleStorage
bool _faulty
 

Detailed Description

Definition at line 38 of file MemoryBundleStorage.h.

Constructor & Destructor Documentation

dtn::storage::MemoryBundleStorage::MemoryBundleStorage ( const dtn::data::Length  maxsize = 0)

Definition at line 40 of file MemoryBundleStorage.cpp.

dtn::storage::MemoryBundleStorage::~MemoryBundleStorage ( )
virtual

Definition at line 45 of file MemoryBundleStorage.cpp.

Member Function Documentation

void dtn::storage::MemoryBundleStorage::clear ( )
virtual
void dtn::storage::MemoryBundleStorage::componentDown ( ) throw ()
protectedvirtual

Implements dtn::daemon::IntegratedComponent.

Definition at line 55 of file MemoryBundleStorage.cpp.

References dtn::core::EventDispatcher< E >::remove().

Here is the call graph for this function:

void dtn::storage::MemoryBundleStorage::componentUp ( ) throw ()
protectedvirtual

Implements dtn::daemon::IntegratedComponent.

Definition at line 49 of file MemoryBundleStorage.cpp.

References dtn::core::EventDispatcher< E >::add().

Here is the call graph for this function:

dtn::data::Size dtn::storage::MemoryBundleStorage::count ( )
virtual
See Also
BundleStorage::count()

Reimplemented from dtn::storage::BundleStorage.

Definition at line 91 of file MemoryBundleStorage.cpp.

bool dtn::storage::MemoryBundleStorage::empty ( )
virtual
See Also
BundleStorage::empty()

Reimplemented from dtn::storage::BundleStorage.

Definition at line 79 of file MemoryBundleStorage.cpp.

void dtn::storage::MemoryBundleStorage::eventBundleExpired ( const dtn::data::MetaBundle b) throw ()
protectedvirtual
dtn::data::Bundle dtn::storage::MemoryBundleStorage::get ( const dtn::data::BundleID id)
virtual

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

Parameters
idThe ID of the bundle to return.
Returns
A bundle object of the

Implements dtn::storage::BundleStorage.

Definition at line 121 of file MemoryBundleStorage.cpp.

References dtn::storage::BundleStorage::_faulty, ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, TAG, and ibrcommon::Exception::what().

Here is the call graph for this function:

void dtn::storage::MemoryBundleStorage::get ( const BundleSelector cb,
BundleResult result 
) throw (NoBundleFoundException, BundleSelectorException)
virtual
See Also
BundleSeeker::get(BundleSelector &cb, BundleResult &result)

Implements dtn::storage::BundleStorage.

Definition at line 97 of file MemoryBundleStorage.cpp.

References dtn::utils::Clock::isExpired(), dtn::data::MetaBundle::lifetime, and dtn::data::BundleID::timestamp.

Here is the call graph for this function:

const MemoryBundleStorage::eid_set dtn::storage::MemoryBundleStorage::getDistinctDestinations ( )
virtual
See Also
BundleSeeker::getDistinctDestinations()

Implements dtn::storage::BundleStorage.

Definition at line 151 of file MemoryBundleStorage.cpp.

References dtn::data::PrimaryBlock::destination, and dtn::data::Bundle::insert().

Here is the call graph for this function:

const std::string dtn::storage::MemoryBundleStorage::getName ( ) const
virtual
See Also
Component::getName()

Implements dtn::daemon::Component.

Definition at line 74 of file MemoryBundleStorage.cpp.

References TAG.

void dtn::storage::MemoryBundleStorage::raiseEvent ( const dtn::core::Event evt) throw ()
virtual

This method is used to receive events.

Parameters
evt

Implements dtn::core::EventReceiver.

Definition at line 61 of file MemoryBundleStorage.cpp.

References dtn::core::TimeEvent::getAction(), dtn::core::TimeEvent::getTimestamp(), and dtn::core::TIME_SECOND_TICK.

Here is the call graph for this function:

void dtn::storage::MemoryBundleStorage::releaseCustody ( const dtn::data::EID custodian,
const dtn::data::BundleID id 
)
virtual
void dtn::storage::MemoryBundleStorage::remove ( const dtn::data::BundleID id)
virtual

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

Parameters
idThe ID of the bundle to remove.

Implements dtn::storage::BundleStorage.

Definition at line 201 of file MemoryBundleStorage.cpp.

References dtn::storage::BundleStorage::eventBundleRemoved(), and dtn::data::BundleList::remove().

Here is the call graph for this function:

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

Remove one bundles which match this filter

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

Reimplemented from dtn::storage::BundleStorage.

Definition at line 222 of file MemoryBundleStorage.cpp.

References ibrcommon::BloomFilter::contains(), dtn::storage::BundleStorage::eventBundleRemoved(), and dtn::data::BundleList::remove().

Here is the call graph for this function:

Member Data Documentation

const std::string dtn::storage::MemoryBundleStorage::TAG = "MemoryBundleStorage"
static

Definition at line 41 of file MemoryBundleStorage.h.

Referenced by get(), getName(), and store().


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