Classes | Public Member Functions | Protected Member Functions

dtn::core::BundleStorage Class Reference

#include <BundleStorage.h>

Inherited by dtn::core::MemoryBundleStorage, dtn::core::SimpleBundleStorage, and dtn::core::SQLiteBundleStorage.

List of all members.

Classes

class  BundleFilterCallback
class  BundleLoadException
class  NoBundleFoundException
class  StorageSizeExeededException

Public Member Functions

virtual ~BundleStorage ()=0
virtual void store (const dtn::data::Bundle &bundle)=0
virtual dtn::data::Bundle get (const dtn::data::BundleID &id)=0
virtual const std::list
< dtn::data::MetaBundle
get (BundleFilterCallback &cb)=0
virtual void remove (const dtn::data::BundleID &id)=0
void remove (const dtn::data::Bundle &b)
virtual dtn::data::MetaBundle remove (const ibrcommon::BloomFilter &filter)=0
virtual void clear ()
virtual bool empty ()
virtual unsigned int count ()
virtual void releaseCustody (const dtn::data::EID &custodian, const dtn::data::BundleID &id)=0
const dtn::data::EID acceptCustody (const dtn::data::MetaBundle &meta)
void rejectCustody (const dtn::data::MetaBundle &meta)

Protected Member Functions

 BundleStorage ()

Detailed Description

Definition at line 24 of file BundleStorage.h.


Constructor & Destructor Documentation

dtn::core::BundleStorage::~BundleStorage (  )  [pure virtual]

destructor

Definition at line 22 of file BundleStorage.cpp.

dtn::core::BundleStorage::BundleStorage (  )  [protected]

constructor

Definition at line 18 of file BundleStorage.cpp.


Member Function Documentation

const dtn::data::EID dtn::core::BundleStorage::acceptCustody ( const dtn::data::MetaBundle meta  ) 
virtual void dtn::core::BundleStorage::clear (  )  [inline, virtual]

Clears all bundles and fragments in the storage.

Definition at line 121 of file BundleStorage.h.

virtual unsigned int dtn::core::BundleStorage::count (  )  [inline, virtual]
Returns:
the count of bundles in the storage

Definition at line 131 of file BundleStorage.h.

virtual bool dtn::core::BundleStorage::empty (  )  [inline, virtual]
Returns:
True, if no bundles in the storage.

Definition at line 126 of file BundleStorage.h.

virtual dtn::data::Bundle dtn::core::BundleStorage::get ( const dtn::data::BundleID id  )  [pure virtual]
virtual const std::list<dtn::data::MetaBundle> dtn::core::BundleStorage::get ( BundleFilterCallback cb  )  [pure virtual]

Query the database for a number of bundles. The bundles are selected with the BundleFilterCallback class which is to implement by the user of this method.

Parameters:
cb The instance of the callback filter class.
Returns:
A list of bundles.
void dtn::core::BundleStorage::rejectCustody ( const dtn::data::MetaBundle meta  ) 
virtual void dtn::core::BundleStorage::releaseCustody ( const dtn::data::EID custodian,
const dtn::data::BundleID id 
) [pure virtual]

This method is called if another node accepts custody for a bundle of us.

Parameters:
bundle 

Referenced by dtn::core::BundleCore::raiseEvent().

void dtn::core::BundleStorage::remove ( const dtn::data::Bundle b  ) 

This method deletes a specific bundle in the storage. No reports will be generated here.

Parameters:
b The bundle to remove.

Definition at line 26 of file BundleStorage.cpp.

virtual dtn::data::MetaBundle dtn::core::BundleStorage::remove ( const ibrcommon::BloomFilter filter  )  [pure virtual]

Remove one bundles which match this filter

Parameters:
filter 
Returns:
The bundle meta data of the removed bundle.
virtual void dtn::core::BundleStorage::remove ( const dtn::data::BundleID id  )  [pure 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.

Referenced by dtn::routing::NeighborRoutingExtension::notify(), dtn::core::BundleCore::raiseEvent(), and dtn::routing::EpidemicRoutingExtension::run().

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

Stores a bundle in the storage.

Parameters:
bundle The bundle to store.

Referenced by dtn::routing::BaseRouter::raiseEvent().


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