Classes | Public Member Functions | Protected Member Functions

dtn::core::SimpleBundleStorage Class Reference

#include <SimpleBundleStorage.h>

Inherits dtn::core::DataStorage::Callback, dtn::core::BundleStorage, dtn::core::EventReceiver, dtn::daemon::IntegratedComponent, and dtn::data::BundleList.

Collaboration diagram for dtn::core::SimpleBundleStorage:
Collaboration graph
[legend]

List of all members.

Classes

class  BundleContainer
struct  CMP_BUNDLE_PRIORITY

Public Member Functions

 SimpleBundleStorage (const ibrcommon::File &workdir, size_t maxsize=0, size_t buffer_limit=0)
virtual ~SimpleBundleStorage ()
virtual void store (const dtn::data::Bundle &bundle)
virtual dtn::data::Bundle get (const dtn::data::BundleID &id)
virtual const std::list
< dtn::data::MetaBundle
get (BundleFilterCallback &cb)
void remove (const dtn::data::BundleID &id)
dtn::data::MetaBundle remove (const ibrcommon::BloomFilter &filter)
void clear ()
bool empty ()
unsigned int count ()
size_t size () const
void releaseCustody (const dtn::data::EID &custodian, const dtn::data::BundleID &id)
void raiseEvent (const Event *evt)
virtual const std::string getName () const
virtual void eventDataStorageStored (const dtn::core::DataStorage::Hash &hash)
virtual void eventDataStorageStoreFailed (const dtn::core::DataStorage::Hash &hash, const ibrcommon::Exception &)
virtual void eventDataStorageRemoved (const dtn::core::DataStorage::Hash &hash)
virtual void eventDataStorageRemoveFailed (const dtn::core::DataStorage::Hash &hash, const ibrcommon::Exception &)
virtual void iterateDataStorage (const dtn::core::DataStorage::Hash &hash, dtn::core::DataStorage::istream &stream)

Protected Member Functions

virtual void componentUp ()
virtual void componentDown ()
virtual void eventBundleExpired (const ExpiringBundle &b)

Detailed Description

This storage holds all bundles and fragments in the system memory.

Definition at line 33 of file SimpleBundleStorage.h.


Constructor & Destructor Documentation

dtn::core::SimpleBundleStorage::SimpleBundleStorage ( const ibrcommon::File workdir,
size_t  maxsize = 0,
size_t  buffer_limit = 0 
)

Constructor

Definition at line 24 of file SimpleBundleStorage.cpp.

References dtn::data::BundleList::_bundles, IBRCOMMON_LOGGER, and dtn::core::DataStorage::iterateAll().

Here is the call graph for this function:

dtn::core::SimpleBundleStorage::~SimpleBundleStorage (  )  [virtual]

Destructor

Definition at line 34 of file SimpleBundleStorage.cpp.


Member Function Documentation

void dtn::core::SimpleBundleStorage::clear (  )  [virtual]
See also:
BundleStorage::clear()

Reimplemented from dtn::data::BundleList.

Definition at line 354 of file SimpleBundleStorage.cpp.

References dtn::data::BundleList::_bundles, dtn::core::DataStorage::remove(), and dtn::data::BundleID::toString().

Here is the call graph for this function:

void dtn::core::SimpleBundleStorage::componentDown (  )  [protected, virtual]
void dtn::core::SimpleBundleStorage::componentUp (  )  [protected, virtual]

Definition at line 163 of file SimpleBundleStorage.cpp.

References dtn::core::EventReceiver::bindEvent(), dtn::core::TimeEvent::className, and ibrcommon::JoinableThread::start().

Here is the call graph for this function:

unsigned int dtn::core::SimpleBundleStorage::count (  ) 
See also:
BundleStorage::count()

Definition at line 205 of file SimpleBundleStorage.cpp.

References size().

Here is the call graph for this function:

bool dtn::core::SimpleBundleStorage::empty (  ) 
See also:
BundleStorage::empty()

Definition at line 193 of file SimpleBundleStorage.cpp.

void dtn::core::SimpleBundleStorage::eventBundleExpired ( const ExpiringBundle b  )  [protected, virtual]
void dtn::core::SimpleBundleStorage::eventDataStorageRemoved ( const dtn::core::DataStorage::Hash hash  )  [virtual]

Definition at line 65 of file SimpleBundleStorage.cpp.

void dtn::core::SimpleBundleStorage::eventDataStorageRemoveFailed ( const dtn::core::DataStorage::Hash hash,
const ibrcommon::Exception ex 
) [virtual]

Definition at line 85 of file SimpleBundleStorage.cpp.

References IBRCOMMON_LOGGER, and ibrcommon::Exception::what().

Here is the call graph for this function:

void dtn::core::SimpleBundleStorage::eventDataStorageStored ( const dtn::core::DataStorage::Hash hash  )  [virtual]

Definition at line 38 of file SimpleBundleStorage.cpp.

void dtn::core::SimpleBundleStorage::eventDataStorageStoreFailed ( const dtn::core::DataStorage::Hash hash,
const ibrcommon::Exception ex 
) [virtual]

Definition at line 46 of file SimpleBundleStorage.cpp.

References IBRCOMMON_LOGGER, and ibrcommon::Exception::what().

Here is the call graph for this function:

dtn::data::Bundle dtn::core::SimpleBundleStorage::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 of the

Definition at line 232 of file SimpleBundleStorage.cpp.

References IBRCOMMON_LOGGER, and ibrcommon::Exception::what().

Here is the call graph for this function:

const std::list< dtn::data::MetaBundle > dtn::core::SimpleBundleStorage::get ( BundleFilterCallback &  cb  )  [virtual]
const std::string dtn::core::SimpleBundleStorage::getName (  )  const [virtual]
See also:
Component::getName()

Definition at line 188 of file SimpleBundleStorage.cpp.

void dtn::core::SimpleBundleStorage::iterateDataStorage ( const dtn::core::DataStorage::Hash hash,
dtn::core::DataStorage::istream stream 
) [virtual]

Definition at line 90 of file SimpleBundleStorage.cpp.

References dtn::data::BundleList::add(), IBRCOMMON_LOGGER, dtn::core::DataStorage::remove(), and dtn::core::DataStorage::Hash::value.

Here is the call graph for this function:

void dtn::core::SimpleBundleStorage::raiseEvent ( const Event evt  ) 

This method is used to receive events.

Parameters:
evt 

Definition at line 176 of file SimpleBundleStorage.cpp.

References dtn::data::BundleList::expire(), dtn::core::TimeEvent::getAction(), and dtn::core::TimeEvent::getTimestamp().

Here is the call graph for this function:

void dtn::core::SimpleBundleStorage::releaseCustody ( const dtn::data::EID custodian,
const dtn::data::BundleID id 
)
See also:
BundleStorage::releaseCustody();

Definition at line 199 of file SimpleBundleStorage.cpp.

void dtn::core::SimpleBundleStorage::remove ( const dtn::data::BundleID id  ) 

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

Parameters:
id The ID of the bundle to remove.

Definition at line 295 of file SimpleBundleStorage.cpp.

References dtn::core::DataStorage::remove(), and dtn::data::BundleID::toString().

Referenced by remove().

Here is the call graph for this function:

dtn::data::MetaBundle dtn::core::SimpleBundleStorage::remove ( const ibrcommon::BloomFilter filter  ) 

Remove one bundles which match this filter

Parameters:
filter 
Returns:
The bundle meta data of the removed bundle.

Definition at line 322 of file SimpleBundleStorage.cpp.

References ibrcommon::BloomFilter::contains(), dtn::core::DataStorage::remove(), remove(), and dtn::data::BundleID::toString().

Here is the call graph for this function:

size_t dtn::core::SimpleBundleStorage::size (  )  const

Get the current size

Definition at line 349 of file SimpleBundleStorage.cpp.

Referenced by count().

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

Stores a bundle in the storage.

Parameters:
bundle The bundle to store.

Definition at line 258 of file SimpleBundleStorage.cpp.

References dtn::data::BundleList::add(), dtn::data::DefaultSerializer::getLength(), and dtn::core::DataStorage::store().

Here is the call graph for this function:


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