IBR-DTN
1.0.0
|
#include <MemoryBundleStorage.h>
Protected Member Functions | |
virtual void | componentUp () throw () |
virtual void | componentDown () throw () |
virtual void | eventBundleExpired (const dtn::data::MetaBundle &b) throw () |
![]() | |
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 | |
![]() | |
typedef std::set< dtn::data::EID > | eid_set |
![]() | |
bool | _faulty |
Definition at line 39 of file MemoryBundleStorage.h.
dtn::storage::MemoryBundleStorage::MemoryBundleStorage | ( | const dtn::data::Length | maxsize = 0 | ) |
Definition at line 38 of file MemoryBundleStorage.cpp.
|
virtual |
Definition at line 43 of file MemoryBundleStorage.cpp.
|
virtual |
Reimplemented from dtn::storage::BundleStorage.
Definition at line 236 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 53 of file MemoryBundleStorage.cpp.
References dtn::core::EventDispatcher< E >::remove().
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 47 of file MemoryBundleStorage.cpp.
References dtn::core::EventDispatcher< E >::add().
|
virtual |
This method returns true if the requested bundle is stored in the storage.
Implements dtn::storage::BundleStorage.
Definition at line 193 of file MemoryBundleStorage.cpp.
|
virtual |
Reimplemented from dtn::storage::BundleStorage.
Definition at line 86 of file MemoryBundleStorage.cpp.
|
virtual |
Reimplemented from dtn::storage::BundleStorage.
Definition at line 74 of file MemoryBundleStorage.cpp.
|
protectedvirtual |
Implements dtn::data::BundleList::Listener.
Definition at line 257 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 112 of file MemoryBundleStorage.cpp.
References dtn::storage::BundleStorage::_faulty.
|
virtual |
Implements dtn::storage::BundleStorage.
Definition at line 92 of file MemoryBundleStorage.cpp.
References dtn::utils::Clock::isExpired().
|
virtual |
Implements dtn::storage::BundleStorage.
Definition at line 142 of file MemoryBundleStorage.cpp.
References dtn::data::PrimaryBlock::destination, and dtn::data::Bundle::insert().
|
virtual |
Implements dtn::daemon::Component.
Definition at line 69 of file MemoryBundleStorage.cpp.
|
virtual |
Get meta data about a specific bundle ID
Implements dtn::storage::BundleStorage.
Definition at line 199 of file MemoryBundleStorage.cpp.
References dtn::data::BundleList::begin(), and dtn::data::BundleList::end().
|
virtual |
This method is used to receive events.
evt |
Implements dtn::core::EventReceiver< dtn::core::TimeEvent >.
Definition at line 59 of file MemoryBundleStorage.cpp.
References dtn::core::TIME_SECOND_TICK.
|
virtual |
Implements dtn::storage::BundleStorage.
Definition at line 80 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 215 of file MemoryBundleStorage.cpp.
References dtn::data::MetaBundle::create(), 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 157 of file MemoryBundleStorage.cpp.
References dtn::storage::BundleStorage::_faulty, dtn::data::BundleList::add(), dtn::storage::BundleStorage::allocSpace(), dtn::data::MetaBundle::create(), dtn::storage::BundleStorage::eventBundleAdded(), dtn::storage::BundleStorage::freeSpace(), dtn::data::DefaultSerializer::getLength(), dtn::storage::BundleStorage::size(), and dtn::data::BundleID::toString().