#include <SimpleBundleStorage.h>
Classes | |
| class | BundleContainer |
| class | BundleStore |
| class | Task |
| class | TaskStoreBundle |
Public Member Functions | |
| SimpleBundleStorage (size_t maxsize=0) | |
| SimpleBundleStorage (const ibrcommon::File &workdir, size_t maxsize=0) | |
| virtual | ~SimpleBundleStorage () |
| virtual void | store (const dtn::data::Bundle &bundle) |
| virtual dtn::data::Bundle | get (const dtn::data::BundleID &id) |
| virtual dtn::data::Bundle | get (const dtn::data::EID &eid) |
| virtual dtn::data::Bundle | get (const ibrcommon::BloomFilter &filter) |
| const std::list < dtn::data::BundleID > | getList () |
| void | remove (const dtn::data::BundleID &id) |
| void | clear () |
| bool | empty () |
| unsigned int | count () |
| size_t | size () const |
| void | releaseCustody (dtn::data::BundleID &bundle) |
| void | raiseEvent (const Event *evt) |
Protected Member Functions | |
| virtual void | componentUp () |
| virtual void | componentRun () |
| virtual void | componentDown () |
This storage holds all bundles and fragments in the system memory.
Definition at line 30 of file SimpleBundleStorage.h.
| dtn::core::SimpleBundleStorage::SimpleBundleStorage | ( | size_t | maxsize = 0 |
) |
Constructor
Definition at line 21 of file SimpleBundleStorage.cpp.
References dtn::core::EventReceiver::bindEvent(), dtn::core::GlobalEvent::className, and dtn::core::TimeEvent::className.
| dtn::core::SimpleBundleStorage::SimpleBundleStorage | ( | const ibrcommon::File & | workdir, | |
| size_t | maxsize = 0 | |||
| ) |
Constructor
Definition at line 28 of file SimpleBundleStorage.cpp.
| dtn::core::SimpleBundleStorage::~SimpleBundleStorage | ( | ) | [virtual] |
Destructor
Definition at line 33 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::clear | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
Definition at line 81 of file SimpleBundleStorage.cpp.
| void dtn::core::SimpleBundleStorage::componentDown | ( | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 42 of file SimpleBundleStorage.cpp.
References dtn::core::TimeEvent::className, dtn::core::EventReceiver::unbindEvent(), and ibrcommon::ThreadSafeQueue< T >::unblock().
| void dtn::core::SimpleBundleStorage::componentRun | ( | void | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 49 of file SimpleBundleStorage.cpp.
References ibrcommon::ThreadSafeQueue< T >::blockingpop(), and dtn::daemon::IndependentComponent::isRunning().
| void dtn::core::SimpleBundleStorage::componentUp | ( | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 37 of file SimpleBundleStorage.cpp.
References dtn::core::EventReceiver::bindEvent(), and dtn::core::TimeEvent::className.
| unsigned int dtn::core::SimpleBundleStorage::count | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
Definition at line 93 of file SimpleBundleStorage.cpp.
| bool dtn::core::SimpleBundleStorage::empty | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
Definition at line 87 of file SimpleBundleStorage.cpp.
| dtn::data::Bundle dtn::core::SimpleBundleStorage::get | ( | const ibrcommon::BloomFilter & | filter | ) | [virtual] |
Returns one bundle which is not in the bloomfilter
| filter |
Implements dtn::core::BundleStorage.
Definition at line 133 of file SimpleBundleStorage.cpp.
| dtn::data::Bundle dtn::core::SimpleBundleStorage::get | ( | const dtn::data::EID & | eid | ) | [virtual] |
This method returns a bundle which is addressed to a EID.
| eid | The receiver for the bundle. |
Implements dtn::core::BundleStorage.
Definition at line 122 of file SimpleBundleStorage.cpp.
References dtn::data::EID::getString(), IBRCOMMON_LOGGER_DEBUG, and IBRCOMMON_LOGGER_ENDL.
| 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 128 of file SimpleBundleStorage.cpp.
Referenced by dtn::routing::NeighborRoutingExtension::NeighborRoutingExtension(), and dtn::routing::StaticRoutingExtension::StaticRoutingExtension().
| const std::list< dtn::data::BundleID > dtn::core::SimpleBundleStorage::getList | ( | ) |
Definition at line 138 of file SimpleBundleStorage.cpp.
Referenced by dtn::routing::NeighborRoutingExtension::NeighborRoutingExtension(), and dtn::routing::StaticRoutingExtension::StaticRoutingExtension().
| void dtn::core::SimpleBundleStorage::raiseEvent | ( | const Event * | evt | ) | [virtual] |
This method is used to receive events.
| evt |
Implements dtn::core::EventReceiver.
Definition at line 68 of file SimpleBundleStorage.cpp.
References dtn::core::TimeEvent::getAction(), dtn::core::TimeEvent::getTimestamp(), and dtn::core::TIME_SECOND_TICK.
| void dtn::core::SimpleBundleStorage::releaseCustody | ( | dtn::data::BundleID & | bundle | ) | [virtual] |
Implements dtn::core::BundleStorage.
Definition at line 103 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 143 of file SimpleBundleStorage.cpp.
| size_t dtn::core::SimpleBundleStorage::size | ( | ) | const |
Get the current size
Definition at line 98 of file SimpleBundleStorage.cpp.
| 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 115 of file SimpleBundleStorage.cpp.
References dtn::core::BUNDLE_STORED, IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::core::BundleEvent::raise(), and dtn::data::Bundle::toString().
1.6.3