#include <SQLiteBundleStorage.h>
Classes | |
| class | Task |
Public Member Functions | |
| SQLiteBundleStorage (ibrcommon::File dbPath, string dbFile, size_t size) | |
| virtual | ~SQLiteBundleStorage () |
| void | store (const dtn::data::Bundle &bundle) |
| dtn::data::Bundle | get (const ibrcommon::BloomFilter &filter) |
| dtn::data::Bundle | get (const dtn::data::BundleID &id) |
| dtn::data::Bundle | get (const dtn::data::EID &eid) |
| void | remove (const dtn::data::BundleID &id) |
| void | clear () |
| bool | empty () |
| unsigned int | count () |
| void | releaseCustody (dtn::data::BundleID &bundle) |
| void | raiseEvent (const Event *evt) |
Protected Member Functions | |
| virtual void | componentUp () |
| virtual void | componentRun () |
| virtual void | componentDown () |
Definition at line 34 of file SQLiteBundleStorage.h.
| dtn::core::SQLiteBundleStorage::SQLiteBundleStorage | ( | ibrcommon::File | dbPath, | |
| string | dbFile, | |||
| size_t | size | |||
| ) |
Constructor
| Pfad | zum Ordner in denen die Datein gespeichert werden. | |
| Dateiname | der Datenbank | |
| maximale | Größe der Datenbank |
Definition at line 30 of file SQLiteBundleStorage.cpp.
| dtn::core::SQLiteBundleStorage::~SQLiteBundleStorage | ( | ) | [virtual] |
destructor
Definition at line 35 of file SQLiteBundleStorage.cpp.
| void dtn::core::SQLiteBundleStorage::clear | ( | ) | [virtual] |
Clears all bundles and fragments in the storage.
Reimplemented from dtn::core::BundleStorage.
Definition at line 333 of file SQLiteBundleStorage.cpp.
| void dtn::core::SQLiteBundleStorage::componentDown | ( | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 128 of file SQLiteBundleStorage.cpp.
References dtn::core::GlobalEvent::className, dtn::core::TimeEvent::className, dtn::core::EventReceiver::unbindEvent(), and ibrcommon::ThreadSafeQueue< T >::unblock().
| void dtn::core::SQLiteBundleStorage::componentRun | ( | void | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 555 of file SQLiteBundleStorage.cpp.
References ibrcommon::ThreadSafeQueue< T >::blockingpop(), and dtn::daemon::IndependentComponent::isRunning().
| void dtn::core::SQLiteBundleStorage::componentUp | ( | ) | [protected, virtual] |
Implements dtn::daemon::IndependentComponent.
Definition at line 39 of file SQLiteBundleStorage.cpp.
References dtn::core::EventReceiver::bindEvent(), dtn::core::GlobalEvent::className, dtn::core::TimeEvent::className, ibrcommon::File::get(), and ibrcommon::File::getPath().
| unsigned int dtn::core::SQLiteBundleStorage::count | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
Definition at line 356 of file SQLiteBundleStorage.cpp.
| bool dtn::core::SQLiteBundleStorage::empty | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
Definition at line 344 of file SQLiteBundleStorage.cpp.
| dtn::data::Bundle dtn::core::SQLiteBundleStorage::get | ( | const dtn::data::EID & | eid | ) | [virtual] |
This method returns a bundle which is addressed to a EID. If there is no bundle available the method will block until a global shutdown or a bundle is available.
| eid | The receiver for the bundle. |
Implements dtn::core::BundleStorage.
Definition at line 218 of file SQLiteBundleStorage.cpp.
References ibrcommon::File::getPath(), and dtn::data::EID::getString().
| dtn::data::Bundle dtn::core::SQLiteBundleStorage::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 177 of file SQLiteBundleStorage.cpp.
References ibrcommon::File::getPath(), and dtn::data::Bundle::toString().
| dtn::data::Bundle dtn::core::SQLiteBundleStorage::get | ( | const ibrcommon::BloomFilter & | filter | ) | [virtual] |
Returns one bundle which is not in the bloomfilter
| filter |
Implements dtn::core::BundleStorage.
Definition at line 172 of file SQLiteBundleStorage.cpp.
| void dtn::core::SQLiteBundleStorage::raiseEvent | ( | const Event * | evt | ) | [virtual] |
| evt |
Implements dtn::core::EventReceiver.
Definition at line 540 of file SQLiteBundleStorage.cpp.
References dtn::core::TimeEvent::getAction(), and dtn::core::TIME_SECOND_TICK.
| void dtn::core::SQLiteBundleStorage::releaseCustody | ( | dtn::data::BundleID & | bundle | ) | [virtual] |
This method is called if another node accepts custody for a bundle of us.
| bundle |
Implements dtn::core::BundleStorage.
Definition at line 155 of file SQLiteBundleStorage.cpp.
| void dtn::core::SQLiteBundleStorage::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 293 of file SQLiteBundleStorage.cpp.
References ibrcommon::File::getPath().
| void dtn::core::SQLiteBundleStorage::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 252 of file SQLiteBundleStorage.cpp.
References dtn::data::PrimaryBlock::_destination, dtn::data::PrimaryBlock::_lifetime, dtn::data::PrimaryBlock::_procflags, dtn::data::PrimaryBlock::_sequencenumber, dtn::data::PrimaryBlock::_source, dtn::data::PrimaryBlock::_timestamp, ibrcommon::File::getPath(), dtn::data::EID::getString(), ibrcommon::Thread::priority, dtn::data::PrimaryBlock::PRIORITY_BIT1, dtn::data::PrimaryBlock::PRIORITY_BIT2, and ibrcommon::Conditional::signal().
1.6.3