#include <SQLiteBundleStorage.h>

Public Member Functions | |
| SQLiteBundleStorage (ibrcommon::File dbPath, string dbFile, int size) | |
| virtual | ~SQLiteBundleStorage () |
| void | store (const dtn::data::Bundle &bundle) |
| dtn::data::Bundle | get (const dtn::data::BundleID &id) |
| dtn::data::Bundle | get (const dtn::data::EID &eid) |
| void | unblock (const dtn::data::EID &eid) |
| void | remove (const dtn::data::BundleID &id) |
| void | clear () |
| bool | empty () |
| unsigned int | count () |
| void | getVector (vector< dtn::data::Bundle > &bundles) |
| void | raiseEvent (const Event *evt) |
| void | run (void) |
Definition at line 28 of file SQLiteBundleStorage.h.
| dtn::core::SQLiteBundleStorage::SQLiteBundleStorage | ( | ibrcommon::File | dbPath, | |
| string | dbFile, | |||
| int | size | |||
| ) |
Constructor
| Pfad | zum Ordner in denen die Datein gespeichert werden. | |
| Dateiname | der Datenbank | |
| maximale | Größe der Datenbank |
Definition at line 24 of file SQLiteBundleStorage.cpp.
References dtn::core::EventReceiver::bindEvent(), dtn::core::GlobalEvent::className, dtn::core::TimeEvent::className, ibrcommon::File::get(), and ibrcommon::File::getPath().
| dtn::core::SQLiteBundleStorage::~SQLiteBundleStorage | ( | ) | [virtual] |
destructor
Definition at line 113 of file SQLiteBundleStorage.cpp.
References dtn::core::GlobalEvent::className, dtn::core::TimeEvent::className, ibrcommon::JoinableThread::join(), ibrcommon::Conditional::signal(), and dtn::core::EventReceiver::unbindEvent().
| 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 260 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().
| 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 157 of file SQLiteBundleStorage.cpp.
References ibrcommon::File::getPath(), and dtn::data::Bundle::toString().
| 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 197 of file SQLiteBundleStorage.cpp.
References ibrcommon::Conditional::wait().
| void dtn::core::SQLiteBundleStorage::unblock | ( | const dtn::data::EID & | eid | ) |
Unblock the get()-call for a specific EID.
| eid |
Definition at line 341 of file SQLiteBundleStorage.cpp.
References ibrcommon::Conditional::signal().
| 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 301 of file SQLiteBundleStorage.cpp.
References ibrcommon::File::getPath().
| void dtn::core::SQLiteBundleStorage::clear | ( | ) | [virtual] |
Clears all bundles and fragments in the storage.
Reimplemented from dtn::core::BundleStorage.
Definition at line 347 of file SQLiteBundleStorage.cpp.
| bool dtn::core::SQLiteBundleStorage::empty | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
Definition at line 360 of file SQLiteBundleStorage.cpp.
| unsigned int dtn::core::SQLiteBundleStorage::count | ( | ) | [virtual] |
Reimplemented from dtn::core::BundleStorage.
Definition at line 372 of file SQLiteBundleStorage.cpp.
| void dtn::core::SQLiteBundleStorage::getVector | ( | vector< dtn::data::Bundle > & | bundles | ) |
| void dtn::core::SQLiteBundleStorage::raiseEvent | ( | const Event * | evt | ) | [virtual] |
| evt |
Implements dtn::core::EventReceiver.
Definition at line 555 of file SQLiteBundleStorage.cpp.
References dtn::core::TimeEvent::getAction(), dtn::core::GlobalEvent::getAction(), dtn::core::GlobalEvent::GLOBAL_SHUTDOWN, ibrcommon::Conditional::signal(), and dtn::core::TIME_SECOND_TICK.
| void dtn::core::SQLiteBundleStorage::run | ( | void | ) | [virtual] |
Abstract interface for thread context run method.
Implements ibrcommon::Thread.
Definition at line 582 of file SQLiteBundleStorage.cpp.
References ibrcommon::Conditional::wait().
1.5.6