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


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, IBRCOMMON_LOGGER_ENDL, 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] |
Implements dtn::daemon::IntegratedComponent.
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] |
Implements dtn::daemon::IntegratedComponent.
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 | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
Definition at line 205 of file SimpleBundleStorage.cpp.
References size().

| bool dtn::core::SimpleBundleStorage::empty | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
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] |
Implements dtn::core::DataStorage::Callback.
Definition at line 65 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::eventDataStorageRemoveFailed | ( | const dtn::core::DataStorage::Hash & | hash, |
| const ibrcommon::Exception & | ex | ||
| ) | [virtual] |
Implements dtn::core::DataStorage::Callback.
Definition at line 85 of file SimpleBundleStorage.cpp.
References IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, and ibrcommon::Exception::what().

| void dtn::core::SimpleBundleStorage::eventDataStorageStored | ( | const dtn::core::DataStorage::Hash & | hash | ) | [virtual] |
Implements dtn::core::DataStorage::Callback.
Definition at line 38 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::eventDataStorageStoreFailed | ( | const dtn::core::DataStorage::Hash & | hash, |
| const ibrcommon::Exception & | ex | ||
| ) | [virtual] |
Implements dtn::core::DataStorage::Callback.
Definition at line 46 of file SimpleBundleStorage.cpp.
References IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, 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. |
Implements dtn::core::BundleStorage.
Definition at line 232 of file SimpleBundleStorage.cpp.
References IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, and ibrcommon::Exception::what().

| const std::list< dtn::data::MetaBundle > dtn::core::SimpleBundleStorage::get | ( | BundleFilterCallback & | cb | ) | [virtual] |
Implements dtn::core::BundleStorage.
Definition at line 211 of file SimpleBundleStorage.cpp.
References dtn::core::BundleStorage::BundleFilterCallback::limit(), and dtn::core::BundleStorage::BundleFilterCallback::shouldAdd().

| const std::string dtn::core::SimpleBundleStorage::getName | ( | ) | const [virtual] |
Implements dtn::daemon::Component.
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] |
Implements dtn::core::DataStorage::Callback.
Definition at line 90 of file SimpleBundleStorage.cpp.
References dtn::data::BundleList::add(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, dtn::core::DataStorage::remove(), and dtn::core::DataStorage::Hash::value.

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

| void dtn::core::SimpleBundleStorage::releaseCustody | ( | const dtn::data::EID & | custodian, |
| const dtn::data::BundleID & | id | ||
| ) | [virtual] |
Implements dtn::core::BundleStorage.
Definition at line 199 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::remove | ( | const dtn::data::BundleID & | id | ) | [virtual] |
This method deletes a specific bundle in the storage. No reports will be generated here.
| id | The ID of the bundle to remove. |
Implements dtn::core::BundleStorage.
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 | ) | [virtual] |
Remove one bundles which match this filter
| filter |
Reimplemented from dtn::core::BundleStorage.
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. |
Implements dtn::core::BundleStorage.
Definition at line 258 of file SimpleBundleStorage.cpp.
References dtn::data::BundleList::add(), dtn::data::DefaultSerializer::getLength(), and dtn::core::DataStorage::store().
