#include <KademliaNodeHandle.h>
Public Member Functions | |
KademliaBucketEntry () | |
Constructs an unspecified NodeHandle. | |
KademliaBucketEntry (const NodeHandle &handle, simtime_t rtt=MAXTIME) | |
KademliaBucketEntry (const OverlayKey &key, const IPvXAddress &ip, int port) | |
Complete constructor. | |
simtime_t | getRtt () const |
void | setRtt (simtime_t rtt) |
bool | operator< (const KademliaBucketEntry &entry) const |
uint8_t | getStaleCount () const |
void | setStaleCount (uint8_t staleCount) |
void | resetStaleCount () |
void | incStaleCount () |
void | setLastSeen (simtime_t lastSeen) |
simtime_t | getLastSeen () |
Private Attributes | |
uint8_t | staleCount |
simtime_t | lastSeen |
simtime_t | rtt |
Friends | |
std::ostream & | operator<< (std::ostream &os, const KademliaBucketEntry &n) |
KademliaBucketEntry::KademliaBucketEntry | ( | ) | [inline] |
Constructs an unspecified NodeHandle.
00037 : NodeHandle() 00038 { 00039 staleCount = 0; 00040 rtt = MAXTIME; 00041 }
KademliaBucketEntry::KademliaBucketEntry | ( | const NodeHandle & | handle, | |
simtime_t | rtt = MAXTIME | |||
) | [inline] |
KademliaBucketEntry::KademliaBucketEntry | ( | const OverlayKey & | key, | |
const IPvXAddress & | ip, | |||
int | port | |||
) | [inline] |
Complete constructor.
key | The OverlayKey | |
ip | The IPvXAddress | |
port | The UDP-Port |
00060 : NodeHandle(key, ip, port) 00061 { 00062 staleCount = 0; 00063 rtt = MAXTIME; 00064 }
simtime_t KademliaBucketEntry::getRtt | ( | ) | const [inline] |
Referenced by Kademlia::routingAdd(), and RttExtractor< KademliaBucketEntry >::rtt().
00066 { return rtt; }
void KademliaBucketEntry::setRtt | ( | simtime_t | rtt | ) | [inline] |
bool KademliaBucketEntry::operator< | ( | const KademliaBucketEntry & | entry | ) | const [inline] |
uint8_t KademliaBucketEntry::getStaleCount | ( | ) | const [inline] |
void KademliaBucketEntry::setStaleCount | ( | uint8_t | staleCount | ) | [inline] |
void KademliaBucketEntry::resetStaleCount | ( | ) | [inline] |
void KademliaBucketEntry::incStaleCount | ( | ) | [inline] |
void KademliaBucketEntry::setLastSeen | ( | simtime_t | lastSeen | ) | [inline] |
simtime_t KademliaBucketEntry::getLastSeen | ( | ) | [inline] |
std::ostream& operator<< | ( | std::ostream & | os, | |
const KademliaBucketEntry & | n | |||
) | [friend] |
uint8_t KademliaBucketEntry::staleCount [private] |
Referenced by getStaleCount(), incStaleCount(), and KademliaBucketEntry().
simtime_t KademliaBucketEntry::lastSeen [private] |
Referenced by getLastSeen().
simtime_t KademliaBucketEntry::rtt [private] |
Referenced by getRtt(), KademliaBucketEntry(), and operator<().