#include <SimpleBundleStorage.h>
Inherits dtn::core::DataStorage::Callback, dtn::core::BundleStorage, dtn::core::EventReceiver, dtn::daemon::IntegratedComponent, and dtn::data::BundleList.

Classes | |
| class | BundleContainer |
| struct | CMP_BUNDLE_PRIORITY |
Public Member Functions | |
| SimpleBundleStorage (const ibrcommon::File &workdir, size_t maxsize=0, size_t buffer_limit=0) | |
| virtual | ~SimpleBundleStorage () |
| 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 |
| virtual void | eventDataStorageStored (const dtn::core::DataStorage::Hash &hash) |
| virtual void | eventDataStorageStoreFailed (const dtn::core::DataStorage::Hash &hash, const ibrcommon::Exception &) |
| virtual void | eventDataStorageRemoved (const dtn::core::DataStorage::Hash &hash) |
| virtual void | eventDataStorageRemoveFailed (const dtn::core::DataStorage::Hash &hash, const ibrcommon::Exception &) |
| virtual void | iterateDataStorage (const dtn::core::DataStorage::Hash &hash, dtn::core::DataStorage::istream &stream) |
Protected Member Functions | |
| virtual void | componentUp () |
| virtual void | componentDown () |
| virtual void | eventBundleExpired (const ExpiringBundle &b) |
This storage holds all bundles and fragments in the system memory.
Definition at line 33 of file SimpleBundleStorage.h.
| dtn::core::SimpleBundleStorage::SimpleBundleStorage | ( | const ibrcommon::File & | workdir, | |
| size_t | maxsize = 0, |
|||
| size_t | buffer_limit = 0 | |||
| ) |
Constructor
Definition at line 24 of file SimpleBundleStorage.cpp.
References dtn::data::BundleList::_bundles, IBRCOMMON_LOGGER, and dtn::core::DataStorage::iterateAll().

| dtn::core::SimpleBundleStorage::~SimpleBundleStorage | ( | ) | [virtual] |
Destructor
Definition at line 34 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::clear | ( | ) | [virtual] |
Reimplemented from dtn::data::BundleList.
Definition at line 354 of file SimpleBundleStorage.cpp.
References dtn::data::BundleList::_bundles, dtn::core::DataStorage::remove(), and dtn::data::BundleID::toString().

| void dtn::core::SimpleBundleStorage::componentDown | ( | ) | [protected, virtual] |
Definition at line 169 of file SimpleBundleStorage.cpp.
References dtn::core::TimeEvent::className, ibrcommon::JoinableThread::join(), ibrcommon::JoinableThread::stop(), and dtn::core::EventReceiver::unbindEvent().

| void dtn::core::SimpleBundleStorage::componentUp | ( | ) | [protected, virtual] |
Definition at line 163 of file SimpleBundleStorage.cpp.
References dtn::core::EventReceiver::bindEvent(), dtn::core::TimeEvent::className, and ibrcommon::JoinableThread::start().

| unsigned int dtn::core::SimpleBundleStorage::count | ( | ) |
Definition at line 205 of file SimpleBundleStorage.cpp.
References size().

| bool dtn::core::SimpleBundleStorage::empty | ( | ) |
Definition at line 193 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::eventBundleExpired | ( | const ExpiringBundle & | b | ) | [protected, virtual] |
Reimplemented from dtn::data::BundleList.
Definition at line 378 of file SimpleBundleStorage.cpp.
References dtn::data::BundleList::ExpiringBundle::bundle, dtn::core::BUNDLE_DELETED, dtn::data::StatusReportBlock::LIFETIME_EXPIRED, dtn::core::BundleExpiredEvent::raise(), dtn::core::BundleEvent::raise(), dtn::core::DataStorage::remove(), and dtn::data::BundleID::toString().

| void dtn::core::SimpleBundleStorage::eventDataStorageRemoved | ( | const dtn::core::DataStorage::Hash & | hash | ) | [virtual] |
Definition at line 65 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::eventDataStorageRemoveFailed | ( | const dtn::core::DataStorage::Hash & | hash, | |
| const ibrcommon::Exception & | ex | |||
| ) | [virtual] |
Definition at line 85 of file SimpleBundleStorage.cpp.
References IBRCOMMON_LOGGER, and ibrcommon::Exception::what().

| void dtn::core::SimpleBundleStorage::eventDataStorageStored | ( | const dtn::core::DataStorage::Hash & | hash | ) | [virtual] |
Definition at line 38 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::eventDataStorageStoreFailed | ( | const dtn::core::DataStorage::Hash & | hash, | |
| const ibrcommon::Exception & | ex | |||
| ) | [virtual] |
Definition at line 46 of file SimpleBundleStorage.cpp.
References IBRCOMMON_LOGGER, and ibrcommon::Exception::what().

| dtn::data::Bundle dtn::core::SimpleBundleStorage::get | ( | const dtn::data::BundleID & | id | ) | [virtual] |
This method returns a specific bundle which is identified by its id.
| id | The ID of the bundle to return. |
Definition at line 232 of file SimpleBundleStorage.cpp.
References IBRCOMMON_LOGGER, and ibrcommon::Exception::what().

| const std::list< dtn::data::MetaBundle > dtn::core::SimpleBundleStorage::get | ( | BundleFilterCallback & | cb | ) | [virtual] |
Definition at line 211 of file SimpleBundleStorage.cpp.
| const std::string dtn::core::SimpleBundleStorage::getName | ( | ) | const [virtual] |
Definition at line 188 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::iterateDataStorage | ( | const dtn::core::DataStorage::Hash & | hash, | |
| dtn::core::DataStorage::istream & | stream | |||
| ) | [virtual] |
Definition at line 90 of file SimpleBundleStorage.cpp.
References dtn::data::BundleList::add(), IBRCOMMON_LOGGER, dtn::core::DataStorage::remove(), and dtn::core::DataStorage::Hash::value.

| void dtn::core::SimpleBundleStorage::raiseEvent | ( | const Event * | evt | ) |
This method is used to receive events.
| evt |
Definition at line 176 of file SimpleBundleStorage.cpp.
References dtn::data::BundleList::expire(), dtn::core::TimeEvent::getAction(), and dtn::core::TimeEvent::getTimestamp().

| void dtn::core::SimpleBundleStorage::releaseCustody | ( | const dtn::data::EID & | custodian, | |
| const dtn::data::BundleID & | id | |||
| ) |
Definition at line 199 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::remove | ( | const dtn::data::BundleID & | id | ) |
This method deletes a specific bundle in the storage. No reports will be generated here.
| id | The ID of the bundle to remove. |
Definition at line 295 of file SimpleBundleStorage.cpp.
References dtn::core::DataStorage::remove(), and dtn::data::BundleID::toString().
Referenced by remove().

| dtn::data::MetaBundle dtn::core::SimpleBundleStorage::remove | ( | const ibrcommon::BloomFilter & | filter | ) |
Remove one bundles which match this filter
| filter |
Definition at line 322 of file SimpleBundleStorage.cpp.
References ibrcommon::BloomFilter::contains(), dtn::core::DataStorage::remove(), remove(), and dtn::data::BundleID::toString().

| size_t dtn::core::SimpleBundleStorage::size | ( | ) | const |
| void dtn::core::SimpleBundleStorage::store | ( | const dtn::data::Bundle & | bundle | ) | [virtual] |
Stores a bundle in the storage.
| bundle | The bundle to store. |
Definition at line 258 of file SimpleBundleStorage.cpp.
References dtn::data::BundleList::add(), dtn::data::DefaultSerializer::getLength(), and dtn::core::DataStorage::store().

1.7.1