IBR-DTNSuite  0.12
dtn::storage::SQLiteBundleSet Class Reference

#include <SQLiteBundleSet.h>

Inheritance diagram for dtn::storage::SQLiteBundleSet:
Inheritance graph
Collaboration diagram for dtn::storage::SQLiteBundleSet:
Collaboration graph

Classes

class  Factory
 

Public Member Functions

 SQLiteBundleSet (const size_t id, bool persistant, dtn::data::BundleSet::Listener *listener, dtn::data::Size bf_size, dtn::storage::SQLiteDatabase &database)
 
virtual ~SQLiteBundleSet ()
 
virtual refcnt_ptr< BundleSetImpl > copy () const
 
virtual void assign (const refcnt_ptr< BundleSetImpl > &)
 
virtual void add (const dtn::data::MetaBundle &bundle) throw ()
 
virtual void clear () throw ()
 
virtual bool has (const dtn::data::BundleID &bundle) const throw ()
 
virtual void expire (const dtn::data::Timestamp timestamp) throw ()
 
virtual dtn::data::Size size () const throw ()
 
dtn::data::Length getLength () const throw ()
 
const ibrcommon::BloomFiltergetBloomFilter () const throw ()
 
std::set< dtn::data::MetaBundlegetNotIn (const ibrcommon::BloomFilter &filter) const throw ()
 
virtual std::ostream & serialize (std::ostream &stream) const
 
virtual std::istream & deserialize (std::istream &stream)
 
- Public Member Functions inherited from dtn::data::BundleSetImpl
virtual ~BundleSetImpl ()=0
 
virtual void assign (const refcnt_ptr< BundleSetImpl > &)=0
 
virtual void sync () throw ()
 

Detailed Description

Definition at line 38 of file SQLiteBundleSet.h.

Constructor & Destructor Documentation

dtn::storage::SQLiteBundleSet::SQLiteBundleSet ( const size_t  id,
bool  persistant,
dtn::data::BundleSet::Listener listener,
dtn::data::Size  bf_size,
dtn::storage::SQLiteDatabase database 
)
Parameters
bf_sizeInitial size fo the bloom-filter.

Definition at line 109 of file SQLiteBundleSet.cpp.

References dtn::storage::SQLiteDatabase::Statement::step().

Referenced by copy(), and dtn::storage::SQLiteBundleSet::Factory::create().

Here is the call graph for this function:

dtn::storage::SQLiteBundleSet::~SQLiteBundleSet ( )
virtual

Definition at line 134 of file SQLiteBundleSet.cpp.

Member Function Documentation

void dtn::storage::SQLiteBundleSet::add ( const dtn::data::MetaBundle bundle)
throw (
)
virtual

Implements dtn::data::BundleSetImpl.

Definition at line 202 of file SQLiteBundleSet.cpp.

References dtn::storage::SQLiteDatabase::Statement::step().

Here is the call graph for this function:

void dtn::storage::SQLiteBundleSet::assign ( const refcnt_ptr< BundleSetImpl > &  other)
virtual

clears the bundle-set and copy all entries from the given one into this bundle-set

Definition at line 176 of file SQLiteBundleSet.cpp.

References clear(), refcnt_ptr< T >::getPointer(), and dtn::storage::SQLiteDatabase::Statement::step().

Here is the call graph for this function:

void dtn::storage::SQLiteBundleSet::clear ( )
throw (
)
virtual

Implements dtn::data::BundleSetImpl.

Definition at line 235 of file SQLiteBundleSet.cpp.

References ibrcommon::BloomFilter::clear(), and dtn::storage::SQLiteDatabase::Statement::step().

Referenced by assign(), and deserialize().

Here is the call graph for this function:

refcnt_ptr< dtn::data::BundleSetImpl > dtn::storage::SQLiteBundleSet::copy ( ) const
virtual

copies the current bundle-set into a new temporary one

Implements dtn::data::BundleSetImpl.

Definition at line 154 of file SQLiteBundleSet.cpp.

References dtn::storage::SQLiteBundleSet::Factory::create(), SQLiteBundleSet(), and dtn::storage::SQLiteDatabase::Statement::step().

Here is the call graph for this function:

std::istream & dtn::storage::SQLiteBundleSet::deserialize ( std::istream &  stream)
virtual

Implements dtn::data::BundleSetImpl.

Definition at line 402 of file SQLiteBundleSet.cpp.

References clear(), and ibrcommon::BloomFilter::load().

Here is the call graph for this function:

void dtn::storage::SQLiteBundleSet::expire ( const dtn::data::Timestamp  timestamp)
throw (
)
virtual
const ibrcommon::BloomFilter & dtn::storage::SQLiteBundleSet::getBloomFilter ( ) const
throw (
)
virtual

Implements dtn::data::BundleSetImpl.

Definition at line 357 of file SQLiteBundleSet.cpp.

dtn::data::Length dtn::storage::SQLiteBundleSet::getLength ( ) const
throw (
)
virtual

Returns the data length of the serialized BundleSet

Implements dtn::data::BundleSetImpl.

Definition at line 352 of file SQLiteBundleSet.cpp.

References ibrcommon::BloomFilter::size().

Here is the call graph for this function:

std::set< dtn::data::MetaBundle > dtn::storage::SQLiteBundleSet::getNotIn ( const ibrcommon::BloomFilter filter) const
throw (
)
virtual

Implements dtn::data::BundleSetImpl.

Definition at line 362 of file SQLiteBundleSet.cpp.

References dtn::data::MetaBundle::create(), and dtn::storage::SQLiteDatabase::Statement::step().

Here is the call graph for this function:

bool dtn::storage::SQLiteBundleSet::has ( const dtn::data::BundleID bundle) const
throw (
)
virtual

Implements dtn::data::BundleSetImpl.

Definition at line 250 of file SQLiteBundleSet.cpp.

References dtn::storage::SQLiteDatabase::Statement::step().

Here is the call graph for this function:

std::ostream & dtn::storage::SQLiteBundleSet::serialize ( std::ostream &  stream) const
virtual

Implements dtn::data::BundleSetImpl.

Definition at line 391 of file SQLiteBundleSet.cpp.

References size(), ibrcommon::BloomFilter::size(), and ibrcommon::BloomFilter::table().

Here is the call graph for this function:

dtn::data::Size dtn::storage::SQLiteBundleSet::size ( ) const
throw (
)
virtual

Returns the number of elements in this set

Implements dtn::data::BundleSetImpl.

Definition at line 333 of file SQLiteBundleSet.cpp.

References dtn::storage::SQLiteDatabase::Statement::step().

Referenced by serialize().

Here is the call graph for this function:


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