|
IBR-DTNSuite 0.6
|
#include <BundleStorage.h>

Classes | |
| class | BundleFilterCallback |
| class | BundleLoadException |
| class | NoBundleFoundException |
| class | StorageSizeExeededException |
Public Member Functions | |
| virtual | ~BundleStorage ()=0 |
| virtual void | store (const dtn::data::Bundle &bundle)=0 |
| virtual dtn::data::Bundle | get (const dtn::data::BundleID &id)=0 |
| virtual const std::list < dtn::data::MetaBundle > | get (BundleFilterCallback &cb)=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) |
| virtual void | clear () |
| virtual bool | empty () |
| virtual unsigned int | count () |
| virtual void | releaseCustody (const dtn::data::EID &custodian, const dtn::data::BundleID &id)=0 |
| 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) |
Protected Member Functions | |
| BundleStorage () | |
Definition at line 25 of file BundleStorage.h.
| dtn::core::BundleStorage::~BundleStorage | ( | ) | [pure virtual] |
destructor
Definition at line 22 of file BundleStorage.cpp.
| dtn::core::BundleStorage::BundleStorage | ( | ) | [protected] |
constructor
Definition at line 18 of file BundleStorage.cpp.
| const dtn::data::EID dtn::core::BundleStorage::acceptCustody | ( | const dtn::data::MetaBundle & | meta | ) |
Accept custody for a given bundle. The previous custodian gets notified with a custody accept message.
| bundle |
Definition at line 36 of file BundleStorage.cpp.
References dtn::data::CustodySignalBlock::_custody_accepted, dtn::data::PrimaryBlock::_destination, dtn::data::PrimaryBlock::_source, dtn::data::MetaBundle::custodian, dtn::core::CUSTODY_ACCEPT, dtn::data::PrimaryBlock::CUSTODY_REQUESTED, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::data::MetaBundle::get(), dtn::core::BundleCore::local, dtn::data::PrimaryBlock::PRIORITY_BIT1, dtn::data::PrimaryBlock::PRIORITY_BIT2, dtn::data::Bundle::push_back(), dtn::core::CustodyEvent::raise(), dtn::core::BundleGeneratedEvent::raise(), dtn::data::PrimaryBlock::set(), and dtn::data::CustodySignalBlock::setMatch().
Referenced by dtn::core::SQLiteBundleStorage::store().

| virtual void dtn::core::BundleStorage::clear | ( | ) | [inline, virtual] |
Clears all bundles and fragments in the storage.
Reimplemented in dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Definition at line 122 of file BundleStorage.h.
| virtual unsigned int dtn::core::BundleStorage::count | ( | ) | [inline, virtual] |
Reimplemented in dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Definition at line 132 of file BundleStorage.h.
| virtual bool dtn::core::BundleStorage::empty | ( | ) | [inline, virtual] |
Reimplemented in dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Definition at line 127 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. |
Implemented in dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Referenced by dtn::routing::BaseRouter::getBundle(), dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::routing::BaseRouter::raiseEvent(), dtn::core::BundleCore::raiseEvent(), dtn::routing::StaticRoutingExtension::run(), dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().
| virtual const std::list<dtn::data::MetaBundle> dtn::core::BundleStorage::get | ( | BundleFilterCallback & | cb | ) | [pure virtual] |
Query the database for a number of bundles. The bundles are selected with the BundleFilterCallback class which is to implement by the user of this method.
| cb | The instance of the callback filter class. |
Implemented in dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
| void dtn::core::BundleStorage::rejectCustody | ( | const dtn::data::MetaBundle & | meta, |
| dtn::data::CustodySignalBlock::REASON_CODE | reason = dtn::data::CustodySignalBlock::NO_ADDITIONAL_INFORMATION |
||
| ) |
Reject custody for a given bundle. The custodian of this bundle gets notified with a custody reject message.
| bundle |
Definition at line 73 of file BundleStorage.cpp.
References dtn::data::PrimaryBlock::_destination, dtn::data::CustodySignalBlock::_reason, dtn::data::PrimaryBlock::_source, dtn::data::MetaBundle::custodian, dtn::core::CUSTODY_REJECT, dtn::data::PrimaryBlock::CUSTODY_REQUESTED, dtn::data::MetaBundle::get(), 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 | ( | const dtn::data::EID & | custodian, |
| const dtn::data::BundleID & | id | ||
| ) | [pure virtual] |
This method is called if another node accepts custody for a bundle of us.
| bundle |
Implemented in dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Referenced by dtn::core::BundleCore::raiseEvent().
| 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 26 of file BundleStorage.cpp.
| dtn::data::MetaBundle dtn::core::BundleStorage::remove | ( | const ibrcommon::BloomFilter & | filter | ) | [virtual] |
Remove one bundles which match this filter
| filter |
Reimplemented in dtn::core::MemoryBundleStorage, and dtn::core::SimpleBundleStorage.
Definition at line 31 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. |
Implemented in dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Referenced by dtn::routing::NeighborRoutingExtension::notify(), and dtn::core::BundleCore::raiseEvent().
| virtual void dtn::core::BundleStorage::store | ( | const dtn::data::Bundle & | bundle | ) | [pure virtual] |
Stores a bundle in the storage.
| bundle | The bundle to store. |
Implemented in dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Referenced by dtn::routing::BaseRouter::raiseEvent().