#include <BundleStorage.h>
Classes | |
| 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 ibrcommon::BloomFilter &filter)=0 |
| virtual dtn::data::Bundle | get (const dtn::data::BundleID &id)=0 |
| virtual dtn::data::Bundle | get (const dtn::data::EID &eid)=0 |
| virtual void | remove (const dtn::data::BundleID &id)=0 |
| void | remove (const dtn::data::Bundle &b) |
| 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 () | |
Definition at line 22 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.
| 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 31 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::routing::QueueBundleEvent::raise(), and dtn::data::CustodySignalBlock::setMatch().
| virtual void dtn::core::BundleStorage::clear | ( | ) | [inline, virtual] |
Clears all bundles and fragments in the storage.
Reimplemented in dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Definition at line 91 of file BundleStorage.h.
| virtual unsigned int dtn::core::BundleStorage::count | ( | ) | [inline, virtual] |
Reimplemented in dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Definition at line 101 of file BundleStorage.h.
| virtual bool dtn::core::BundleStorage::empty | ( | ) | [inline, virtual] |
Reimplemented in dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Definition at line 96 of file BundleStorage.h.
| virtual dtn::data::Bundle dtn::core::BundleStorage::get | ( | const dtn::data::EID & | eid | ) | [pure virtual] |
This method returns a bundle which is addressed to a EID.
| eid | The receiver for the bundle. |
Implemented in dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
| 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::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
| virtual dtn::data::Bundle dtn::core::BundleStorage::get | ( | const ibrcommon::BloomFilter & | filter | ) | [pure virtual] |
Returns one bundle which is not in the bloomfilter
| filter |
Implemented in dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Referenced by dtn::routing::BaseRouter::getBundle(), dtn::core::BundleCore::raiseEvent(), dtn::routing::EpidemicRoutingExtension::run(), dtn::daemon::ClientHandler::run(), and dtn::routing::BaseRouter::transferTo().
| 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 63 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::routing::QueueBundleEvent::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 |
Implemented in 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.
| 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::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Referenced by dtn::routing::StaticRoutingExtension::notify(), dtn::routing::EpidemicRoutingExtension::notify(), dtn::core::BundleCore::raiseEvent(), dtn::routing::EpidemicRoutingExtension::run(), and dtn::daemon::ClientHandler::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. |
Implemented in dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.
Referenced by dtn::routing::BaseRouter::raiseEvent().
1.6.3