dtn::core::SimpleBundleStorage Class Reference

#include <SimpleBundleStorage.h>

Inheritance diagram for dtn::core::SimpleBundleStorage:

dtn::utils::Service dtn::core::AbstractBundleStorage dtn::core::EventReceiver

List of all members.

Public Member Functions

 SimpleBundleStorage (unsigned int size=1024 *1024, unsigned int bundle_maxsize=1024)
virtual ~SimpleBundleStorage ()
void store (const BundleSchedule &schedule)
BundlestoreFragment (const Bundle &bundle)
BundleSchedule getSchedule (unsigned int dtntime)
BundleSchedule getSchedule (string destination)
void clear ()
bool isEmpty ()
unsigned int getCount ()

Protected Member Functions

virtual void tick ()
void terminate ()
void eventNodeAvailable (const Node &node)
void eventNodeUnavailable (const Node &node)

Private Member Functions

void deleteDeprecated ()

Private Attributes

list< BundleSchedulem_schedules
list< list< Bundle > > m_fragments
unsigned int m_nextdeprecation
time_t m_last_compress
unsigned int m_size
unsigned int m_bundle_maxsize
unsigned int m_currentsize
bool m_nocleanup
Mutex m_readlock
Mutex m_fragmentslock
map< string, Nodem_neighbours


Detailed Description

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

Constructor & Destructor Documentation

dtn::core::SimpleBundleStorage::SimpleBundleStorage ( unsigned int  size = 1024 * 1024,
unsigned int  bundle_maxsize = 1024 
)

Constructor

Parameters:
[in] size Size of the memory storage in kBytes. (e.g. 1024*1024 = 1MB)
[in] bundle_maxsize Maximum size of one bundle in bytes.

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

Destructor

References clear().


Member Function Documentation

void dtn::core::SimpleBundleStorage::store ( const BundleSchedule schedule  )  [virtual]

Bundle * dtn::core::SimpleBundleStorage::storeFragment ( const Bundle bundle  )  [virtual]

BundleSchedule dtn::core::SimpleBundleStorage::getSchedule ( unsigned int  dtntime  ) 

BundleSchedule dtn::core::SimpleBundleStorage::getSchedule ( string  destination  ) 

void dtn::core::SimpleBundleStorage::clear (  )  [virtual]

See also:
BundleStorage::clear()

Reimplemented from dtn::core::AbstractBundleStorage.

References m_currentsize, m_fragments, m_readlock, and m_schedules.

Referenced by ~SimpleBundleStorage().

bool dtn::core::SimpleBundleStorage::isEmpty (  )  [virtual]

See also:
BundleStorage::isEmpty()

Reimplemented from dtn::core::AbstractBundleStorage.

References m_readlock, and m_schedules.

Referenced by getSchedule().

unsigned int dtn::core::SimpleBundleStorage::getCount (  )  [virtual]

See also:
BundleStorage::getCount()

Reimplemented from dtn::core::AbstractBundleStorage.

References m_readlock, and m_schedules.

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

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

void dtn::core::SimpleBundleStorage::eventNodeAvailable ( const Node node  )  [protected, virtual]

void dtn::core::SimpleBundleStorage::eventNodeUnavailable ( const Node node  )  [protected, virtual]

void dtn::core::SimpleBundleStorage::deleteDeprecated (  )  [private]


Member Data Documentation

Referenced by clear(), and storeFragment().

A variable to hold the next timeout of a bundle in the storage.

Referenced by deleteDeprecated(), and store().

Referenced by store().

Referenced by store().

Referenced by storeFragment().


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

Generated on Wed Mar 25 12:41:38 2009 for IBR-DTN by  doxygen 1.5.6