dtn::core::SQLiteBundleStorage Class Reference

#include <SQLiteBundleStorage.h>

Inheritance diagram for dtn::core::SQLiteBundleStorage:

dtn::core::BundleStorage dtn::core::EventReceiver ibrcommon::JoinableThread ibrcommon::Thread

List of all members.

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)


Detailed Description

Definition at line 28 of file SQLiteBundleStorage.h.


Constructor & Destructor Documentation

dtn::core::SQLiteBundleStorage::SQLiteBundleStorage ( ibrcommon::File  dbPath,
string  dbFile,
int  size 
)

Constructor

Parameters:
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]


Member Function Documentation

void dtn::core::SQLiteBundleStorage::store ( const dtn::data::Bundle bundle  )  [virtual]

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.

Parameters:
id The ID of the bundle to return.
Returns:
A bundle object.

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.

Parameters:
eid The receiver for the bundle.
Returns:
A bundle object.

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.

Parameters:
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.

Parameters:
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]

Returns:
True, if no bundles in the storage.

Reimplemented from dtn::core::BundleStorage.

Definition at line 360 of file SQLiteBundleStorage.cpp.

unsigned int dtn::core::SQLiteBundleStorage::count (  )  [virtual]

Returns:
the count of bundles in the storage

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]

Returns:
the amount of available storage space This method is used to receive events.
Parameters:
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().


The documentation for this class was generated from the following files:

Generated on Fri Jul 30 09:15:34 2010 for IBR-DTNSuite by  doxygen 1.5.6