IBR-DTNSuite
0.10
|
#include <MemoryBundleStorage.h>
Static Public Attributes | |
static const std::string | TAG = "MemoryBundleStorage" |
Protected Member Functions | |
virtual void | componentUp () throw () |
virtual void | componentDown () throw () |
virtual void | eventBundleExpired (const dtn::data::MetaBundle &b) throw () |
Protected Member Functions inherited from dtn::storage::BundleStorage | |
BundleStorage (const dtn::data::Length &maxsize) | |
void | allocSpace (const dtn::data::Length &size) throw (StorageSizeExeededException) |
void | freeSpace (const dtn::data::Length &size) throw () |
void | clearSpace () throw () |
void | eventBundleAdded (const dtn::data::MetaBundle &b) throw () |
void | eventBundleRemoved (const dtn::data::BundleID &id) throw () |
Additional Inherited Members | |
Public Types inherited from dtn::storage::BundleSeeker | |
typedef std::set< dtn::data::EID > | eid_set |
Protected Attributes inherited from dtn::storage::BundleStorage | |
bool | _faulty |
Definition at line 38 of file MemoryBundleStorage.h.
dtn::storage::MemoryBundleStorage::MemoryBundleStorage | ( | const dtn::data::Length | maxsize = 0 | ) |
Definition at line 40 of file MemoryBundleStorage.cpp.
|
virtual |
Definition at line 45 of file MemoryBundleStorage.cpp.
|
virtual |
Reimplemented from dtn::storage::BundleStorage.
Definition at line 248 of file MemoryBundleStorage.cpp.
References dtn::data::BundleList::clear(), dtn::storage::BundleStorage::clearSpace(), and dtn::storage::BundleStorage::eventBundleRemoved().
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 55 of file MemoryBundleStorage.cpp.
References dtn::core::EventDispatcher< E >::remove().
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 49 of file MemoryBundleStorage.cpp.
References dtn::core::EventDispatcher< E >::add().
|
virtual |
Reimplemented from dtn::storage::BundleStorage.
Definition at line 91 of file MemoryBundleStorage.cpp.
|
virtual |
Reimplemented from dtn::storage::BundleStorage.
Definition at line 79 of file MemoryBundleStorage.cpp.
|
protectedvirtual |
Implements dtn::data::BundleList::Listener.
Definition at line 269 of file MemoryBundleStorage.cpp.
References dtn::core::BUNDLE_DELETED, dtn::data::StatusReportBlock::LIFETIME_EXPIRED, dtn::core::BundleExpiredEvent::raise(), and dtn::core::BundleEvent::raise().
|
virtual |
This method returns a specific bundle which is identified by its id.
id | The ID of the bundle to return. |
Implements dtn::storage::BundleStorage.
Definition at line 121 of file MemoryBundleStorage.cpp.
References dtn::storage::BundleStorage::_faulty, ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, TAG, and ibrcommon::Exception::what().
|
virtual |
Implements dtn::storage::BundleStorage.
Definition at line 97 of file MemoryBundleStorage.cpp.
References dtn::utils::Clock::isExpired(), dtn::data::MetaBundle::lifetime, and dtn::data::BundleID::timestamp.
|
virtual |
Implements dtn::storage::BundleStorage.
Definition at line 151 of file MemoryBundleStorage.cpp.
References dtn::data::PrimaryBlock::destination, and dtn::data::Bundle::insert().
|
virtual |
Implements dtn::daemon::Component.
Definition at line 74 of file MemoryBundleStorage.cpp.
References TAG.
|
virtual |
This method is used to receive events.
evt |
Implements dtn::core::EventReceiver.
Definition at line 61 of file MemoryBundleStorage.cpp.
References dtn::core::TimeEvent::getAction(), dtn::core::TimeEvent::getTimestamp(), and dtn::core::TIME_SECOND_TICK.
|
virtual |
Implements dtn::storage::BundleStorage.
Definition at line 85 of file MemoryBundleStorage.cpp.
|
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::storage::BundleStorage.
Definition at line 201 of file MemoryBundleStorage.cpp.
References dtn::storage::BundleStorage::eventBundleRemoved(), and dtn::data::BundleList::remove().
|
virtual |
Remove one bundles which match this filter
filter |
Reimplemented from dtn::storage::BundleStorage.
Definition at line 222 of file MemoryBundleStorage.cpp.
References ibrcommon::BloomFilter::contains(), dtn::storage::BundleStorage::eventBundleRemoved(), and dtn::data::BundleList::remove().
|
virtual |
Stores a bundle in the storage.
bundle | The bundle to store. |
Implements dtn::storage::BundleStorage.
Definition at line 166 of file MemoryBundleStorage.cpp.
References dtn::storage::BundleStorage::_faulty, dtn::data::BundleList::add(), dtn::storage::BundleStorage::allocSpace(), dtn::storage::BundleStorage::eventBundleAdded(), dtn::storage::BundleStorage::freeSpace(), dtn::data::DefaultSerializer::getLength(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::storage::BundleStorage::size(), TAG, and dtn::data::Bundle::toString().
|
static |
Definition at line 41 of file MemoryBundleStorage.h.