|
OverSim
|
#include <KademliaBucket.h>
Public Member Functions | |
| KademliaBucket (uint16_t maxSize=0, const Comparator< OverlayKey > *comparator=NULL) | |
| ~KademliaBucket () | |
| void | setLastUsage (simtime_t time) |
| simtime_t | getLastUsage () const |
Public Member Functions inherited from BaseKeySortedVector< KademliaBucketEntry > | |
| BaseKeySortedVector (uint16_t maxSize=0, const Comparator< OverlayKey > *comparator=NULL, const AbstractProxComparator *proxComparator=NULL, const AbstractProxKeyComparator *proxKeyComparator=NULL, uint16_t sizeProx=0, uint16_t sizeComb=0) | |
| constructor | |
| virtual | ~BaseKeySortedVector () |
| destructor | |
| bool | isAddable (const KademliaBucketEntry &element) const |
| indicates if an object of type T can be added to the NodeVector | |
| bool | isFull () const |
| indicates if NodeVector holds maxSize nodes | |
| bool | isEmpty () const |
| indicates if NodeVector holds at least one node | |
| int | add (const KademliaBucketEntry &element) |
| adds an element of type T in increasing order to the NodeVector and returns the position of the added element or -1 if the element was not added | |
| const bool | contains (const OverlayKey &key) const |
| Searches for an OverlayKey in NodeVector and returns true, if it is found. | |
| const KademliaBucketEntry & | find (const OverlayKey &key) const |
| searches for an OverlayKey in NodeVector | |
| iterator | findIterator (const OverlayKey &key) |
| Searches for an OberlayKey in a NodeVector and returns an appropriate iterator. | |
| void | downsizeTo (const uint32_t maxElements) |
| Downsize the vector to a maximum of maxElements. | |
| void | setComparator (const Comparator< OverlayKey > *comparator) |
Public Attributes | |
| std::list< KademliaBucketEntry > | replacementCache |
Private Attributes | |
| simtime_t | lastUsage |
Additional Inherited Members | |
Public Types inherited from BaseKeySortedVector< KademliaBucketEntry > | |
| typedef std::vector < KademliaBucketEntry > ::iterator | iterator |
| iterator for this vector | |
| typedef std::vector < KademliaBucketEntry > ::const_iterator | const_iterator |
| read-only iterator for this vector | |
Static Public Attributes inherited from BaseKeySortedVector< KademliaBucketEntry > | |
| static const KademliaBucketEntry | UNSPECIFIED_ELEMENT |
| unspecified element of type T | |
Definition at line 28 of file KademliaBucket.h.
| KademliaBucket::KademliaBucket | ( | uint16_t | maxSize = 0, |
| const Comparator< OverlayKey > * | comparator = NULL |
||
| ) |
Definition at line 26 of file KademliaBucket.cc.
| KademliaBucket::~KademliaBucket | ( | ) |
Definition at line 33 of file KademliaBucket.cc.
|
inline |
Definition at line 39 of file KademliaBucket.h.
Referenced by Kademlia::handleBucketRefreshTimerExpired(), and operator<<().
|
inline |
Definition at line 35 of file KademliaBucket.h.
Referenced by Kademlia::handleBucketRefreshTimerExpired(), and Kademlia::setBucketUsage().
|
private |
Definition at line 46 of file KademliaBucket.h.
Referenced by getLastUsage(), KademliaBucket(), and setLastUsage().
| std::list<KademliaBucketEntry> KademliaBucket::replacementCache |
Definition at line 43 of file KademliaBucket.h.
Referenced by Kademlia::routingAdd(), and Kademlia::routingTimeout().