IBR-DTNSuite
0.10
|
#include <NeighborDatabase.h>
Classes | |
class | AlreadyInTransitException |
class | BloomfilterNotAvailableException |
class | DatasetNotAvailableException |
class | NeighborEntry |
class | NeighborNotAvailableException |
class | NoMoreTransfersAvailable |
class | NoRouteKnownException |
Public Member Functions | |
NeighborDatabase () | |
virtual | ~NeighborDatabase () |
NeighborDatabase::NeighborEntry & | get (const dtn::data::EID &eid) throw (NeighborNotAvailableException) |
NeighborDatabase::NeighborEntry & | create (const dtn::data::EID &eid) throw () |
void | remove (const dtn::data::EID &eid) |
void | expire (const dtn::data::Timestamp ×tamp) |
![]() | |
Mutex (MUTEX_TYPE type=MUTEX_NORMAL) | |
virtual | ~Mutex () |
virtual void | trylock () throw (MutexException) |
virtual void | enter () throw (MutexException) |
virtual void | leave () throw (MutexException) |
![]() | |
virtual | ~MutexInterface ()=0 |
Additional Inherited Members | |
![]() | |
enum | MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK } |
![]() | |
static MutexInterface & | dummy () |
![]() | |
pthread_mutex_t | m_mutex |
pthread_mutexattr_t | m_attr |
The neighbor database contains collected information about neighbors. This includes the last timestamp on which a neighbor was seen, the bundles this neighbors has received (bloomfilter with age).
Definition at line 45 of file NeighborDatabase.h.
dtn::routing::NeighborDatabase::NeighborDatabase | ( | ) |
Definition at line 190 of file NeighborDatabase.cpp.
|
virtual |
Definition at line 194 of file NeighborDatabase.cpp.
NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::create | ( | const dtn::data::EID & | eid | ) | throw () |
Query a neighbor entry of the database. If the entry does not exists, a new entry is created and returned.
eid | The EID of the neighbor. |
Definition at line 205 of file NeighborDatabase.cpp.
Referenced by dtn::routing::NodeHandshakeExtension::processHandshake(), and dtn::routing::ProphetRoutingExtension::processHandshake().
void dtn::routing::NeighborDatabase::expire | ( | const dtn::data::Timestamp & | timestamp | ) |
trigger expire mechanisms for bloomfilter and bundle summary
timestamp |
Definition at line 127 of file NeighborDatabase.cpp.
References dtn::routing::NeighborDatabase::NeighborEntry::expire(), and dtn::routing::NeighborDatabase::NeighborEntry::isExpired().
NeighborDatabase::NeighborEntry & dtn::routing::NeighborDatabase::get | ( | const dtn::data::EID & | eid | ) | throw (NeighborNotAvailableException) |
Query a neighbor entry of the database. It throws an exception if the neighbor is not available.
eid | The EID of the neighbor |
Definition at line 221 of file NeighborDatabase.cpp.
References dtn::core::BundleCore::getInstance().
Referenced by dtn::routing::StaticRoutingExtension::run(), dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::EpidemicRoutingExtension::run(), and dtn::routing::RoutingExtension::transferTo().
void dtn::routing::NeighborDatabase::remove | ( | const dtn::data::EID & | eid | ) |
Remove an entry of the database.
eid | The EID of the neighbor to remove. |
Definition at line 238 of file NeighborDatabase.cpp.