DTN::PersistentBundleStore Class Reference

Abstract base class for persistent bundle storage. More...

#include <dtn/PersistentBundleStore.h>

Inheritance diagram for DTN::PersistentBundleStore:

Inheritance graph
[legend]
Collaboration diagram for DTN::PersistentBundleStore:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PersistentBundleStore (Node *owner)
 Constructor.
virtual ~PersistentBundleStore ()
 Virtual destructor.

Protected Member Functions

virtual BundlePointer p_addBundle (Bundle *b)=0
 Protected implementation of addBundle().
virtual void p_deleteBundle (Bundle *b)=0
 Protected implementation of deleteBundle().
virtual BundlePointer p_getPointer (const BundlePointer &p)=0
 Protected implementation of getPointer().
virtual BundlePointer p_getPointer (const ByteString &sender, uint32_t seqNum)=0
 Protected implementation of getPointer().
virtual bool p_validatePointer (const BundlePointer &p)=0
 Protected implementation of validatePointer().
virtual size_t p_bytesUsed ()=0
 Protected implementation of bytesUsed().
virtual size_t p_bundles ()=0
 Protected implementation of bundles().
virtual void p_shrinkStore (size_t s)=0
 Protected implementation of shrinkStore().
virtual void clean ()
 Remove expired Bundles from the store.


Detailed Description

Abstract base class for persistent bundle storage.

A concrete subclass will need to be implemented in the wrapper. The interface is exactly that of the base BundleStore, but this version enforces clean-up of expired Bundles, recording them appropriately as persistent removals.

Definition at line 45 of file PersistentBundleStore.h.


Member Function Documentation

void PersistentBundleStore::clean (  )  [protected, virtual]

Remove expired Bundles from the store.

This is virtual so that derived types can alter the behavior if they really want to.

Definition at line 37 of file PersistentBundleStore.cc.

References DTN::BundlePointerRepr::bundle(), DTN::Bundle::expired(), DTN::BundlePointer::isNull(), DTN::BundleStore::m_owner, DTN::BundlePointer::next(), p_deleteBundle(), p_getPointer(), DTN::Node::recordPersistentRemove(), and DTN::BundlePointer::repr().

Referenced by Epidemic::EpidemicStore::getPointer().


The documentation for this class was generated from the following files:
Generated on Mon Mar 24 11:15:48 2008 for Pydtn Simulator by  doxygen 1.5.4