|
IBR-DTNSuite
0.12
|
#include <MemoryBundleStorage.h>


Public Member Functions | |
| MemoryBundleStorage (const dtn::data::Length maxsize=0) | |
| virtual | ~MemoryBundleStorage () |
| virtual void | store (const dtn::data::Bundle &bundle) |
| virtual bool | contains (const dtn::data::BundleID &id) |
| virtual dtn::data::MetaBundle | info (const dtn::data::BundleID &id) |
| virtual dtn::data::Bundle | get (const dtn::data::BundleID &id) |
| virtual void | get (const BundleSelector &cb, BundleResult &result) throw (NoBundleFoundException, BundleSelectorException) |
| virtual const eid_set | getDistinctDestinations () |
| void | remove (const dtn::data::BundleID &id) |
| void | clear () |
| bool | empty () |
| dtn::data::Size | count () |
| void | releaseCustody (const dtn::data::EID &custodian, const dtn::data::BundleID &id) |
| void | raiseEvent (const dtn::core::Event *evt) throw () |
| virtual const std::string | getName () const |
Public Member Functions inherited from dtn::storage::BundleStorage | |
| virtual | ~BundleStorage ()=0 |
| void | remove (const dtn::data::Bundle &b) |
| dtn::data::Length | size () const |
| const dtn::data::EID | acceptCustody (const dtn::data::MetaBundle &meta) |
| void | rejectCustody (const dtn::data::MetaBundle &meta, dtn::data::CustodySignalBlock::REASON_CODE reason=dtn::data::CustodySignalBlock::NO_ADDITIONAL_INFORMATION) |
| void | attach (dtn::storage::BundleIndex *index) |
| void | detach (dtn::storage::BundleIndex *index) |
| virtual void | wait () |
| virtual void | setFaulty (bool mode) |
Public Member Functions inherited from dtn::storage::BundleSeeker | |
| virtual | ~BundleSeeker () |
Public Member Functions inherited from dtn::core::EventReceiver | |
| virtual | ~EventReceiver ()=0 |
Public Member Functions inherited from dtn::daemon::IntegratedComponent | |
| IntegratedComponent () | |
| virtual | ~IntegratedComponent () |
| virtual void | initialize () throw () |
| virtual void | startup () throw () |
| virtual void | terminate () throw () |
Public Member Functions inherited from dtn::daemon::Component | |
| virtual | ~Component ()=0 |
Public Member Functions inherited from dtn::data::BundleList::Listener | |
| virtual | ~Listener ()=0 |
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 245 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 |
This method returns true if the requested bundle is stored in the storage.
Implements dtn::storage::BundleStorage.
Definition at line 202 of file MemoryBundleStorage.cpp.
|
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 266 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, and ibrcommon::Exception::what().

|
virtual | ||||||||||||||||||||||||
Implements dtn::storage::BundleStorage.
Definition at line 97 of file MemoryBundleStorage.cpp.
References dtn::utils::Clock::isExpired().

|
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.
|
virtual |
Get meta data about a specific bundle ID
Implements dtn::storage::BundleStorage.
Definition at line 208 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.
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 224 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 166 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(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::storage::BundleStorage::size(), and dtn::data::BundleID::toString().
