#include <AbstractBundleStorage.h>

Public Member Functions | |
| virtual void | store (const BundleSchedule &schedule)=0 |
| virtual Bundle * | storeFragment (const Bundle &bundle)=0 |
| virtual void | clear () |
| virtual bool | isEmpty () |
| virtual unsigned int | getCount () |
| void | raiseEvent (const Event *evt) |
Protected Member Functions | |
| AbstractBundleStorage () | |
| ~AbstractBundleStorage () | |
| void | wait () |
| void | stopWait () |
| virtual void | eventNodeAvailable (const Node &node) |
| virtual void | eventNodeUnavailable (const Node &node) |
Private Attributes | |
| Conditional | m_breakwait |
| dtn::core::AbstractBundleStorage::AbstractBundleStorage | ( | ) | [protected] |
| dtn::core::AbstractBundleStorage::~AbstractBundleStorage | ( | ) | [protected] |
| virtual void dtn::core::AbstractBundleStorage::store | ( | const BundleSchedule & | schedule | ) | [pure virtual] |
store a schedule for later use
| schedule | the schedule to store |
Implemented in dtn::core::SimpleBundleStorage.
Referenced by raiseEvent().
| virtual Bundle* dtn::core::AbstractBundleStorage::storeFragment | ( | const Bundle & | bundle | ) | [pure virtual] |
Store a bundle fragment in the storage. If all fragments are available in the storage, they are merged and return by this method. If not, only NULL is returned.
Implemented in dtn::core::SimpleBundleStorage.
Referenced by raiseEvent().
| virtual void dtn::core::AbstractBundleStorage::clear | ( | ) | [inline, virtual] |
Clears all bundles, schedules and fragments in the storage.
Reimplemented in dtn::core::SimpleBundleStorage.
Referenced by ~AbstractBundleStorage().
| virtual bool dtn::core::AbstractBundleStorage::isEmpty | ( | ) | [inline, virtual] |
| virtual unsigned int dtn::core::AbstractBundleStorage::getCount | ( | ) | [inline, virtual] |
| void dtn::core::AbstractBundleStorage::raiseEvent | ( | const Event * | evt | ) | [virtual] |
receive event from the event switch
Implements dtn::core::EventReceiver.
References dtn::core::CUSTODY_ACCEPT, dtn::core::CUSTODY_REJECT, eventNodeAvailable(), eventNodeUnavailable(), dtn::core::NodeEvent::getAction(), dtn::core::StorageEvent::getAction(), dtn::core::TimeEvent::getAction(), dtn::core::BundleSchedule::getBundle(), dtn::core::StorageEvent::getBundle(), dtn::data::Bundle::getCustodian(), dtn::core::BundleSchedule::getEID(), dtn::core::BundleCore::getInstance(), dtn::core::BundleCore::getLocalURI(), dtn::core::NodeEvent::getNode(), dtn::data::Bundle::getPrimaryFlags(), dtn::core::StorageEvent::getSchedule(), dtn::core::BundleSchedule::getTime(), dtn::data::PrimaryFlags::isCustodyRequested(), m_breakwait, dtn::core::NODE_AVAILABLE, dtn::core::NODE_UNAVAILABLE, dtn::core::EventSwitch::raiseEvent(), dtn::core::ROUTE_PROCESS_BUNDLE, dtn::data::Bundle::setCustodian(), dtn::utils::Conditional::signal(), store(), dtn::core::STORE_BUNDLE, dtn::core::STORE_SCHEDULE, storeFragment(), and dtn::core::TIME_SECOND_TICK.
| void dtn::core::AbstractBundleStorage::wait | ( | ) | [protected] |
wait till time has changed
References m_breakwait, and dtn::utils::Conditional::wait().
Referenced by dtn::core::SimpleBundleStorage::tick().
| void dtn::core::AbstractBundleStorage::stopWait | ( | ) | [protected] |
break the wait
References m_breakwait, and dtn::utils::Conditional::signal().
Referenced by dtn::core::SimpleBundleStorage::terminate().
| virtual void dtn::core::AbstractBundleStorage::eventNodeAvailable | ( | const Node & | node | ) | [inline, protected, virtual] |
| virtual void dtn::core::AbstractBundleStorage::eventNodeUnavailable | ( | const Node & | node | ) | [inline, protected, virtual] |
Referenced by raiseEvent(), stopWait(), and wait().
1.5.6