dtn::core::SimpleBundleStorage Class Reference

#include <SimpleBundleStorage.h>

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

List of all members.

Classes

class  BundleContainer
class  BundleStore
class  Task
class  TaskStoreBundle

Public Member Functions

 SimpleBundleStorage (size_t maxsize=0)
 SimpleBundleStorage (const ibrcommon::File &workdir, size_t maxsize=0)
virtual ~SimpleBundleStorage ()
virtual void store (const dtn::data::Bundle &bundle)
virtual dtn::data::Bundle get (const dtn::data::BundleID &id)
virtual dtn::data::Bundle get (const dtn::data::EID &eid)
virtual dtn::data::Bundle get (const ibrcommon::BloomFilter &filter)
const std::list
< dtn::data::BundleID
getList ()
void remove (const dtn::data::BundleID &id)
void clear ()
bool empty ()
unsigned int count ()
size_t size () const
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

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

Definition at line 30 of file SimpleBundleStorage.h.


Constructor & Destructor Documentation

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

Constructor

Definition at line 28 of file SimpleBundleStorage.cpp.

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

Destructor

Definition at line 33 of file SimpleBundleStorage.cpp.


Member Function Documentation

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

Reimplemented from dtn::core::BundleStorage.

Definition at line 81 of file SimpleBundleStorage.cpp.

void dtn::core::SimpleBundleStorage::componentDown (  )  [protected, virtual]
void dtn::core::SimpleBundleStorage::componentRun ( void   )  [protected, virtual]
void dtn::core::SimpleBundleStorage::componentUp (  )  [protected, virtual]
unsigned int dtn::core::SimpleBundleStorage::count (  )  [virtual]
See also:
BundleStorage::count()

Reimplemented from dtn::core::BundleStorage.

Definition at line 93 of file SimpleBundleStorage.cpp.

bool dtn::core::SimpleBundleStorage::empty (  )  [virtual]
See also:
BundleStorage::empty()

Reimplemented from dtn::core::BundleStorage.

Definition at line 87 of file SimpleBundleStorage.cpp.

dtn::data::Bundle dtn::core::SimpleBundleStorage::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 133 of file SimpleBundleStorage.cpp.

dtn::data::Bundle dtn::core::SimpleBundleStorage::get ( const dtn::data::EID eid  )  [virtual]

This method returns a bundle which is addressed to a EID.

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

Implements dtn::core::BundleStorage.

Definition at line 122 of file SimpleBundleStorage.cpp.

References dtn::data::EID::getString(), IBRCOMMON_LOGGER_DEBUG, and IBRCOMMON_LOGGER_ENDL.

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

Implements dtn::core::BundleStorage.

Definition at line 128 of file SimpleBundleStorage.cpp.

Referenced by dtn::routing::NeighborRoutingExtension::NeighborRoutingExtension(), and dtn::routing::StaticRoutingExtension::StaticRoutingExtension().

const std::list< dtn::data::BundleID > dtn::core::SimpleBundleStorage::getList (  ) 
void dtn::core::SimpleBundleStorage::raiseEvent ( const Event evt  )  [virtual]

This method is used to receive events.

Parameters:
evt 

Implements dtn::core::EventReceiver.

Definition at line 68 of file SimpleBundleStorage.cpp.

References dtn::core::TimeEvent::getAction(), dtn::core::TimeEvent::getTimestamp(), and dtn::core::TIME_SECOND_TICK.

void dtn::core::SimpleBundleStorage::releaseCustody ( dtn::data::BundleID bundle  )  [virtual]
See also:
BundleStorage::releaseCustody();

Implements dtn::core::BundleStorage.

Definition at line 103 of file SimpleBundleStorage.cpp.

void dtn::core::SimpleBundleStorage::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 143 of file SimpleBundleStorage.cpp.

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

Get the current size

Definition at line 98 of file SimpleBundleStorage.cpp.

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

Stores a bundle in the storage.

Parameters:
bundle The bundle to store.

Implements dtn::core::BundleStorage.

Definition at line 115 of file SimpleBundleStorage.cpp.

References dtn::core::BUNDLE_STORED, IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::core::BundleEvent::raise(), and dtn::data::Bundle::toString().


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