IBR-DTNSuite  0.10
dtn::routing::NeighborDatabase::NeighborEntry Class Reference

#include <NeighborDatabase.h>

Collaboration diagram for dtn::routing::NeighborDatabase::NeighborEntry:
Collaboration graph

Public Member Functions

 NeighborEntry ()
 
 NeighborEntry (const dtn::data::EID &eid)
 
virtual ~NeighborEntry ()
 
void update (const ibrcommon::BloomFilter &bf, const dtn::data::Number &lifetime=0)
 
void reset ()
 
void add (const dtn::data::MetaBundle &)
 
bool has (const dtn::data::BundleID &, const bool require_bloomfilter=false) const
 
void acquireTransfer (const dtn::data::BundleID &id) throw (NoMoreTransfersAvailable, AlreadyInTransitException)
 
dtn::data::Size getFreeTransferSlots () const
 
bool isTransferThresholdReached () const
 
void releaseTransfer (const dtn::data::BundleID &id)
 
void expire (const dtn::data::Timestamp &timestamp)
 
bool isExpired (const dtn::data::Timestamp &timestamp) const
 
const dtn::data::TimestampgetLastUpdate () const
 
void touch ()
 
template<class T >
const T & getDataset () const throw (DatasetNotAvailableException)
 
void putDataset (NeighborDataset &dset)
 
template<class T >
void removeDataset ()
 

Public Attributes

const dtn::data::EID eid
 

Detailed Description

Definition at line 94 of file NeighborDatabase.h.

Constructor & Destructor Documentation

dtn::routing::NeighborDatabase::NeighborEntry::NeighborEntry ( )

Definition at line 32 of file NeighborDatabase.cpp.

dtn::routing::NeighborDatabase::NeighborEntry::NeighborEntry ( const dtn::data::EID eid)

Definition at line 36 of file NeighborDatabase.cpp.

dtn::routing::NeighborDatabase::NeighborEntry::~NeighborEntry ( )
virtual

Definition at line 40 of file NeighborDatabase.cpp.

Member Function Documentation

void dtn::routing::NeighborDatabase::NeighborEntry::acquireTransfer ( const dtn::data::BundleID id) throw (NoMoreTransfersAvailable, AlreadyInTransitException)

Acquire transfer resources. If no resources is left, an exception is thrown.

Definition at line 143 of file NeighborDatabase.cpp.

References IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, and dtn::core::BundleCore::max_bundles_in_transit.

Referenced by dtn::routing::RoutingExtension::transferTo().

void dtn::routing::NeighborDatabase::NeighborEntry::add ( const dtn::data::MetaBundle bundle)

Definition at line 71 of file NeighborDatabase.cpp.

Referenced by dtn::routing::BaseRouter::raiseEvent().

void dtn::routing::NeighborDatabase::NeighborEntry::expire ( const dtn::data::Timestamp timestamp)

trigger expire mechanisms for bloomfilter and bundle summary

Parameters
timestamp

Definition at line 107 of file NeighborDatabase.cpp.

References IBRCOMMON_LOGGER_DEBUG_TAG, and IBRCOMMON_LOGGER_ENDL.

Referenced by dtn::routing::NeighborDatabase::expire().

template<class T >
const T& dtn::routing::NeighborDatabase::NeighborEntry::getDataset ( ) const throw (DatasetNotAvailableException)
inline

Retrieve a specific data-set.

Definition at line 164 of file NeighborDatabase.h.

dtn::data::Size dtn::routing::NeighborDatabase::NeighborEntry::getFreeTransferSlots ( ) const
Returns
the number of free transfer slots

Definition at line 159 of file NeighborDatabase.cpp.

References dtn::core::BundleCore::max_bundles_in_transit.

const dtn::data::Timestamp & dtn::routing::NeighborDatabase::NeighborEntry::getLastUpdate ( ) const

Returns the last update of this entry

Definition at line 97 of file NeighborDatabase.cpp.

bool dtn::routing::NeighborDatabase::NeighborEntry::has ( const dtn::data::BundleID id,
const bool  require_bloomfilter = false 
) const

Definition at line 76 of file NeighborDatabase.cpp.

bool dtn::routing::NeighborDatabase::NeighborEntry::isExpired ( const dtn::data::Timestamp timestamp) const

Determine if the neighbor entry is expired

Definition at line 91 of file NeighborDatabase.cpp.

Referenced by dtn::routing::NeighborDatabase::expire().

bool dtn::routing::NeighborDatabase::NeighborEntry::isTransferThresholdReached ( ) const
void dtn::routing::NeighborDatabase::NeighborEntry::putDataset ( NeighborDataset dset)

Put a data-set into the entry. The old data-set gets replaced.

Definition at line 180 of file NeighborDatabase.cpp.

Referenced by dtn::routing::ProphetRoutingExtension::processHandshake().

void dtn::routing::NeighborDatabase::NeighborEntry::releaseTransfer ( const dtn::data::BundleID id)

Release a transfer resource, but never exceed the maxium resource limit.

Definition at line 172 of file NeighborDatabase.cpp.

References IBRCOMMON_LOGGER_DEBUG_TAG, and IBRCOMMON_LOGGER_ENDL.

Referenced by dtn::routing::BaseRouter::raiseEvent(), and dtn::routing::RoutingExtension::transferTo().

template<class T >
void dtn::routing::NeighborDatabase::NeighborEntry::removeDataset ( )
inline

Remove a data-set.

Definition at line 188 of file NeighborDatabase.h.

void dtn::routing::NeighborDatabase::NeighborEntry::reset ( )

Definition at line 61 of file NeighborDatabase.cpp.

References dtn::utils::Clock::getTime().

Here is the call graph for this function:

void dtn::routing::NeighborDatabase::NeighborEntry::touch ( )

updates the last update timestamp

Definition at line 102 of file NeighborDatabase.cpp.

References dtn::utils::Clock::getTime().

Here is the call graph for this function:

void dtn::routing::NeighborDatabase::NeighborEntry::update ( const ibrcommon::BloomFilter bf,
const dtn::data::Number lifetime = 0 
)

updates the bloomfilter of this entry with a new one

Parameters
bfThe bloomfilter object
lifetimeThe desired lifetime of this bloomfilter

Definition at line 44 of file NeighborDatabase.cpp.

References dtn::utils::Clock::getExpireTime().

Here is the call graph for this function:

Member Data Documentation

const dtn::data::EID dtn::routing::NeighborDatabase::NeighborEntry::eid

Definition at line 137 of file NeighborDatabase.h.


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