KademliaNodeHandle Class Reference

#include <KademliaNodeHandle.h>

Inheritance diagram for KademliaNodeHandle:

NodeHandle TransportAddress

List of all members.


Detailed Description

Kademlia NodeHandle.

Author:
Sebastian Mies

Public Member Functions

 KademliaNodeHandle ()
 Constructs an unspecified NodeHandle.
 KademliaNodeHandle (const KademliaNodeHandle &handle)
 Copy constructor.
 KademliaNodeHandle (const NodeHandle &handle)
 KademliaNodeHandle (const OverlayKey &key, const IPvXAddress &ip, int port)
 Complete constructor.
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

Constructor & Destructor Documentation

KademliaNodeHandle::KademliaNodeHandle (  )  [inline]

Constructs an unspecified NodeHandle.

00034                           : NodeHandle() 
00035     {
00036         staleCount = 0;
00037     }

KademliaNodeHandle::KademliaNodeHandle ( const KademliaNodeHandle handle  )  [inline]

Copy constructor.

Parameters:
handle The NodeHandle to copy
00044                                                            : NodeHandle( handle ) 
00045     {
00046         staleCount = handle.staleCount;
00047     }

KademliaNodeHandle::KademliaNodeHandle ( const NodeHandle handle  )  [inline]

00050     {
00051         this->ip = handle.ip;
00052         this->port = handle.port;
00053         this->key = handle.key;
00054         staleCount = 0;
00055     }

KademliaNodeHandle::KademliaNodeHandle ( const OverlayKey key,
const IPvXAddress &  ip,
int  port 
) [inline]

Complete constructor.

Parameters:
key The OverlayKey
ip The IPvXAddress
port The UDP-Port
00066                           : NodeHandle( key, ip, port)
00067     {
00068         staleCount = 0;
00069     }


Member Function Documentation

uint8_t KademliaNodeHandle::getStaleCount (  )  const [inline]

00071                                          {
00072         return staleCount;
00073     }

void KademliaNodeHandle::setStaleCount ( uint8_t  staleCount  )  [inline]

00075                                                     {
00076         this->staleCount = staleCount;
00077     }

void KademliaNodeHandle::resetStaleCount (  )  [inline]

00079                                   {
00080         this->setStaleCount(0);
00081     }

void KademliaNodeHandle::incStaleCount (  )  [inline]

00083                                 {
00084         this->staleCount++;
00085     }

void KademliaNodeHandle::setLastSeen ( simtime_t  lastSeen  )  [inline]

00087                                                   {
00088         this->lastSeen = lastSeen;
00089     }

simtime_t KademliaNodeHandle::getLastSeen (  )  [inline]

00091                                    {
00092         return this->lastSeen;
00093     }


Member Data Documentation

uint8_t KademliaNodeHandle::staleCount [private]

simtime_t KademliaNodeHandle::lastSeen [private]


The documentation for this class was generated from the following file:
Generated on Thu Apr 17 13:19:29 2008 for ITM OverSim by  doxygen 1.5.3