dtn::core::SQLiteBundleStorage Class Reference

#include <SQLiteBundleStorage.h>

Inheritance diagram for dtn::core::SQLiteBundleStorage:
dtn::core::BundleStorage dtn::core::EventReceiver dtn::daemon::IndependentComponent dtn::daemon::Component ibrcommon::JoinableThread ibrcommon::Thread

List of all members.

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 ()

Detailed Description

Definition at line 34 of file SQLiteBundleStorage.h.


Constructor & Destructor Documentation

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

Constructor

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


Member Function Documentation

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]
void dtn::core::SQLiteBundleStorage::componentRun ( void   )  [protected, virtual]
void dtn::core::SQLiteBundleStorage::componentUp (  )  [protected, virtual]
unsigned int dtn::core::SQLiteBundleStorage::count (  )  [virtual]
Returns:
the count of bundles in the storage

Reimplemented from dtn::core::BundleStorage.

Definition at line 356 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 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.

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

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.

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

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

Parameters:
filter 
Returns:

Implements dtn::core::BundleStorage.

Definition at line 172 of file SQLiteBundleStorage.cpp.

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

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

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

The documentation for this class was generated from the following files:
Generated on Mon Aug 23 08:12:58 2010 for IBR-DTNSuite by  doxygen 1.6.3