#include <BundleStorage.h>
Inherited by dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Classes | |
| class | NoBundleFoundException |
| class | StorageSizeExeededException |
Public Member Functions | |
| virtual | ~BundleStorage ()=0 |
| void | addToFilter (const dtn::data::EID &eid) |
| virtual void | store (const dtn::data::Bundle &bundle)=0 |
| virtual dtn::data::Bundle | get (const dtn::data::BundleID &id)=0 |
| virtual const dtn::data::MetaBundle | getByDestination (const dtn::data::EID &eid, bool exact=false)=0 |
| virtual const dtn::data::MetaBundle | getByFilter (const ibrcommon::BloomFilter &filter)=0 |
| virtual void | remove (const dtn::data::BundleID &id)=0 |
| void | remove (const dtn::data::Bundle &b) |
| virtual dtn::data::MetaBundle | remove (const ibrcommon::BloomFilter &filter)=0 |
| virtual void | clear () |
| virtual bool | empty () |
| virtual unsigned int | count () |
| virtual void | releaseCustody (dtn::data::BundleID &bundle)=0 |
| void | acceptCustody (dtn::data::Bundle &bundle) |
| void | rejectCustody (const dtn::data::Bundle &bundle) |
Protected Member Functions | |
| BundleStorage () | |
Protected Attributes | |
| std::set< dtn::data::EID > | _destination_filter |
Definition at line 24 of file BundleStorage.h.
| dtn::core::BundleStorage::~BundleStorage | ( | ) | [pure virtual] |
destructor
Definition at line 23 of file BundleStorage.cpp.
| dtn::core::BundleStorage::BundleStorage | ( | ) | [protected] |
constructor
Definition at line 18 of file BundleStorage.cpp.
References _destination_filter, and dtn::core::BundleCore::local.
| void dtn::core::BundleStorage::acceptCustody | ( | dtn::data::Bundle & | bundle | ) |
Accept custody for a given bundle. The bundle is modified by this method and contains us as future custodian. The previous custodian gets notified with a custody accept message.
| bundle |
Definition at line 37 of file BundleStorage.cpp.
References dtn::data::PrimaryBlock::_custodian, dtn::data::PrimaryBlock::_destination, dtn::data::PrimaryBlock::_procflags, dtn::data::PrimaryBlock::_source, dtn::data::CustodySignalBlock::_status, dtn::core::CUSTODY_ACCEPT, dtn::data::PrimaryBlock::CUSTODY_REQUESTED, dtn::core::BundleCore::local, dtn::data::Bundle::push_back(), dtn::core::CustodyEvent::raise(), dtn::core::BundleGeneratedEvent::raise(), and dtn::data::CustodySignalBlock::setMatch().

| void dtn::core::BundleStorage::addToFilter | ( | const dtn::data::EID & | eid | ) |
Add a EID to the destination filter of the storage. This prevents search methods like getByFilter to return a bundle with an destination EID added to the filter.
| eid |
Definition at line 27 of file BundleStorage.cpp.
References _destination_filter.
Referenced by dtn::routing::EpidemicRoutingExtension::EpidemicRoutingExtension().
| virtual void dtn::core::BundleStorage::clear | ( | ) | [inline, virtual] |
Clears all bundles and fragments in the storage.
Definition at line 108 of file BundleStorage.h.
| virtual unsigned int dtn::core::BundleStorage::count | ( | ) | [inline, virtual] |
Definition at line 118 of file BundleStorage.h.
| virtual bool dtn::core::BundleStorage::empty | ( | ) | [inline, virtual] |
Definition at line 113 of file BundleStorage.h.
| virtual dtn::data::Bundle dtn::core::BundleStorage::get | ( | const dtn::data::BundleID & | id | ) | [pure virtual] |
This method returns a specific bundle which is identified by its id.
| id | The ID of the bundle to return. |
Referenced by dtn::routing::BaseRouter::getBundle(), dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::core::BundleCore::raiseEvent(), and dtn::routing::EpidemicRoutingExtension::run().
| virtual const dtn::data::MetaBundle dtn::core::BundleStorage::getByDestination | ( | const dtn::data::EID & | eid, | |
| bool | exact = false | |||
| ) | [pure virtual] |
Query for a bundle with a specific destination. Set exact to true, if the application part should be compared too.
| eid | ||
| exact |
Referenced by dtn::routing::EpidemicRoutingExtension::run().
| virtual const dtn::data::MetaBundle dtn::core::BundleStorage::getByFilter | ( | const ibrcommon::BloomFilter & | filter | ) | [pure virtual] |
Returns a bundle ID which is not in the bloomfilter, but in the storage
| filter |
Referenced by dtn::routing::FloodRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().
| void dtn::core::BundleStorage::rejectCustody | ( | const dtn::data::Bundle & | bundle | ) |
Reject custody for a given bundle. The custodian of this bundle gets notified with a custody reject message.
| bundle |
Definition at line 69 of file BundleStorage.cpp.
References dtn::data::PrimaryBlock::_custodian, dtn::data::PrimaryBlock::_destination, dtn::data::PrimaryBlock::_procflags, dtn::data::PrimaryBlock::_source, dtn::core::CUSTODY_REJECT, dtn::data::PrimaryBlock::CUSTODY_REQUESTED, dtn::core::BundleCore::local, dtn::data::Bundle::push_back(), dtn::core::CustodyEvent::raise(), dtn::core::BundleGeneratedEvent::raise(), and dtn::data::CustodySignalBlock::setMatch().

| virtual void dtn::core::BundleStorage::releaseCustody | ( | dtn::data::BundleID & | bundle | ) | [pure virtual] |
This method is called if another node accepts custody for a bundle of us.
| bundle |
Referenced by dtn::core::BundleCore::raiseEvent().
| virtual dtn::data::MetaBundle dtn::core::BundleStorage::remove | ( | const ibrcommon::BloomFilter & | filter | ) | [pure virtual] |
Remove one bundles which match this filter
| filter |
| void dtn::core::BundleStorage::remove | ( | const dtn::data::Bundle & | b | ) |
This method deletes a specific bundle in the storage. No reports will be generated here.
| b | The bundle to remove. |
Definition at line 32 of file BundleStorage.cpp.
| virtual void dtn::core::BundleStorage::remove | ( | const dtn::data::BundleID & | id | ) | [pure virtual] |
This method deletes a specific bundle in the storage. No reports will be generated here.
| id | The ID of the bundle to remove. |
Referenced by dtn::routing::StaticRoutingExtension::notify(), dtn::routing::FloodRoutingExtension::notify(), dtn::routing::EpidemicRoutingExtension::notify(), dtn::core::BundleCore::raiseEvent(), and dtn::routing::EpidemicRoutingExtension::run().
| virtual void dtn::core::BundleStorage::store | ( | const dtn::data::Bundle & | bundle | ) | [pure virtual] |
Stores a bundle in the storage.
| bundle | The bundle to store. |
Referenced by dtn::routing::BaseRouter::raiseEvent().
std::set<dtn::data::EID> dtn::core::BundleStorage::_destination_filter [protected] |
the destination query filter stores EID which are not returned by search methods like getByFilter()
Definition at line 152 of file BundleStorage.h.
Referenced by addToFilter(), BundleStorage(), and dtn::core::SimpleBundleStorage::getByFilter().
1.7.1