|
OverSim
|
PastryNeighborhoodSet module. More...
#include <PastryNeighborhoodSet.h>
Public Member Functions | |
| void | initializeSet (uint32_t numberOfNeighbors, uint32_t bitsPerDigit, const NodeHandle &owner) |
| Initializes the neighborhood set. | |
| virtual void | dumpToStateMessage (PastryStateMessage *msg) const |
| dump content of the set to a PastryStateMessage | |
| virtual const NodeHandle & | findCloserNode (const OverlayKey &destination, bool optimize=false) |
| try to find a node numerically closer to a given key with the same shared prefix as the current node in the neighborhood set. | |
| void | findCloserNodes (const OverlayKey &destination, NodeVector *nodes) |
| virtual bool | mergeNode (const NodeHandle &node, simtime_t prox) |
| merge a node into NeighborhoodSet | |
| virtual void | dumpToVector (std::vector< TransportAddress > &affected) const |
| appends all neighborhood set entries to a given vector of TransportAddresses, needed to find all Nodes to be notified after joining. | |
| virtual const TransportAddress & | failedNode (const TransportAddress &failed) |
| tell the neighborhood set about a failed node | |
Public Member Functions inherited from PastryStateObject | |
| void | handleMessage (cMessage *msg) |
| int | numInitStages (void) const |
| void | initialize (int stage) |
| virtual const NodeHandle & | getDestinationNode (const OverlayKey &destination) |
| gets the final node according to the Pastry routing scheme. | |
| virtual const TransportAddress & | repair (const PastryStateMessage *msg, const PastryStateMsgProximity &prox) |
| attempt to repair state using a received REPAIR message | |
| virtual bool | mergeState (const PastryStateMessage *msg, const PastryStateMsgProximity *prox) |
| update own state based on a received PastryStateMessage | |
| bool | isCloser (const NodeHandle &test, const OverlayKey &destination, const NodeHandle &reference=NodeHandle::UNSPECIFIED_NODE) const |
| test a given NodeHandle if it is closer to a given destination | |
| bool | specialCloserCondition (const NodeHandle &test, const OverlayKey &destination, const NodeHandle &reference=NodeHandle::UNSPECIFIED_NODE) const |
| test a given NodeHandle if it is closer to a given destination, but only if the shared prefix length with the destination is at least equal to the shared prefix length with our own node | |
Private Member Functions | |
| virtual void | earlyInit (void) |
Private Attributes | |
| uint32_t | numberOfNeighbors |
| std::vector< PastryExtendedNode > | neighbors |
Additional Inherited Members | |
Static Protected Member Functions inherited from PastryStateObject | |
| static const PastryExtendedNode & | unspecNode () |
Protected Attributes inherited from PastryStateObject | |
| NodeHandle | owner |
| stores the NodeHandle of the owner of this PastryStateObject. | |
| uint32_t | bitsPerDigit |
PastryNeighborhoodSet module.
This module contains the NeighborhoodSet of the Pastry implementation.
Definition at line 46 of file PastryNeighborhoodSet.h.
|
virtual |
dump content of the set to a PastryStateMessage
| msg | the PastryStateMessage to be filled with entries |
Implements PastryStateObject.
Definition at line 52 of file PastryNeighborhoodSet.cc.
Referenced by BasePastry::createStateMessage().
|
virtual |
appends all neighborhood set entries to a given vector of TransportAddresses, needed to find all Nodes to be notified after joining.
| affected | the vector to fill with leaf set entries |
Implements PastryStateObject.
Definition at line 136 of file PastryNeighborhoodSet.cc.
Referenced by Pastry::doSecondStage().
|
privatevirtual |
Definition at line 31 of file PastryNeighborhoodSet.cc.
|
virtual |
tell the neighborhood set about a failed node
| failed | the failed node |
Implements PastryStateObject.
Definition at line 146 of file PastryNeighborhoodSet.cc.
Referenced by Bamboo::handleFailedNode(), and Pastry::handleFailedNode().
|
virtual |
try to find a node numerically closer to a given key with the same shared prefix as the current node in the neighborhood set.
this method is to be called, when a regular next hop couldn't be found or wasn't reachable.
| destination | the destination key |
| optimize | if set, check all nodes and return the best/closest one |
Implements PastryStateObject.
Definition at line 69 of file PastryNeighborhoodSet.cc.
Referenced by BasePastry::findNode().
|
virtual |
Implements PastryStateObject.
Definition at line 97 of file PastryNeighborhoodSet.cc.
Referenced by BasePastry::findNode().
| void PastryNeighborhoodSet::initializeSet | ( | uint32_t | numberOfNeighbors, |
| uint32_t | bitsPerDigit, | ||
| const NodeHandle & | owner | ||
| ) |
Initializes the neighborhood set.
This should be called on startup
| numberOfNeighbors | Pastry configuration parameter |
| bitsPerDigit | number of bits per digits |
| owner | the node this table belongs to |
Definition at line 37 of file PastryNeighborhoodSet.cc.
Referenced by BasePastry::baseChangeState().
|
virtual |
merge a node into NeighborhoodSet
| node | the node to merge |
| prox | proximity value of the node |
Implements PastryStateObject.
Definition at line 108 of file PastryNeighborhoodSet.cc.
|
private |
Definition at line 113 of file PastryNeighborhoodSet.h.
Referenced by dumpToStateMessage(), dumpToVector(), earlyInit(), failedNode(), findCloserNode(), findCloserNodes(), initializeSet(), and mergeNode().
|
private |
Definition at line 112 of file PastryNeighborhoodSet.h.
Referenced by dumpToStateMessage(), and initializeSet().