OverSim
|
Pastry overlay module. More...
#include <Pastry.h>
Public Member Functions | |
virtual | ~Pastry () |
virtual void | initializeOverlay (int stage) |
Initializes derived-class-attributes. | |
virtual void | handleTimerEvent (cMessage *msg) |
virtual void | handleUDPMessage (BaseOverlayMessage *msg) |
Processes messages from underlay. | |
void | handleStateMessage (PastryStateMessage *msg) |
processes state messages, merging with own state tables | |
virtual void | pingResponse (PingResponse *pingResponse, cPolymorphic *context, int rpcId, simtime_t rtt) |
Public Member Functions inherited from BasePastry | |
virtual | ~BasePastry () |
int | getMaxNumSiblings () |
Query the maximum number of siblings (nodes close to a key) that are maintained by this overlay protocol. | |
int | getMaxNumRedundantNodes () |
Query the maximum number of redundant next hop nodes that are returned by findNode(). | |
virtual void | handleAppMessage (BaseOverlayMessage *msg) |
processes messages from application | |
virtual void | updateTooltip () |
updates information shown in tk-environment | |
virtual NodeVector * | findNode (const OverlayKey &key, int numRedundantNodes, int numSiblings, BaseOverlayMessage *msg) |
Implements the find node call. | |
virtual void | finishOverlay () |
collects statistical data in derived class | |
virtual bool | isSiblingFor (const NodeHandle &node, const OverlayKey &key, int numSiblings, bool *err) |
Query if a node is among the siblings for a given key. | |
virtual AbstractLookup * | createLookup (RoutingType routingType=DEFAULT_ROUTING, const BaseOverlayMessage *msg=NULL, const cPacket *dummy=NULL, bool appLookup=false) |
Creates an abstract iterative lookup instance. | |
uint8_t | getBitsPerDigit () |
void | proxCallback (const TransportAddress &node, int rpcId, cPolymorphic *contextPointer, Prox prox) |
virtual OverlayKey | estimateMeanDistance () |
returns mean distance between OverlayKeys in the network | |
uint8_t | getRTLastRow () const |
std::vector< TransportAddress > * | getRTRow (uint8_t index) const |
std::vector< TransportAddress > * | getLeafSet () const |
Public Member Functions inherited from BaseOverlay | |
BaseOverlay () | |
virtual | ~BaseOverlay () |
Virtual destructor. | |
States | getState () |
bool | isMalicious () |
Returns true, if node is malicious. | |
bool | isInSimpleMultiOverlayHost () |
Returns true if overlay is one in an array, inside a SimpleMultiOverlayHost. | |
const simtime_t & | getCreationTime () |
void | join (const OverlayKey &nodeID=OverlayKey::UNSPECIFIED_KEY) |
Join the overlay with a given nodeID. | |
virtual NodeVector * | local_lookup (const OverlayKey &key, int num, bool safe) |
finds nodes closest to the given OverlayKey | |
virtual NodeVector * | neighborSet (int num) |
void | sendMessageToUDP (const TransportAddress &dest, cPacket *msg, simtime_t delay=SIMTIME_ZERO) |
Sends message to underlay. | |
void | sendToKey (const OverlayKey &key, BaseOverlayMessage *message, int numSiblings=1, const std::vector< TransportAddress > &sourceRoute=TransportAddress::UNSPECIFIED_NODES, RoutingType routingType=DEFAULT_ROUTING) |
Sends a message to an overlay node, with the generic routing algorithm. | |
void | registerComp (CompType compType, cModule *module) |
cModule * | getCompModule (CompType compType) |
cGate * | getCompRpcGate (CompType compType) |
void | sendMessageToAllComp (cMessage *msg, CompType srcComp) |
bool | providesKbr () |
bool | getMeasureAuthBlock () |
BootstrapList & | getBootstrapList () const |
virtual uint32_t | estimateOverlaySize () |
estimates the current number of nodes online | |
Public Member Functions inherited from BaseRpc | |
BaseRpc () | |
const NodeHandle & | getThisNode () |
Returns the NodeHandle of this node. | |
simtime_t | getUdpTimeout () |
Public Member Functions inherited from RpcListener | |
virtual | ~RpcListener () |
destructor | |
Public Member Functions inherited from BaseTcpSupport | |
virtual void | socketDataArrived (int connId, void *yourPtr, cPacket *msg, bool urgent) |
virtual void | socketEstablished (int connId, void *yourPtr) |
virtual void | socketPeerClosed (int connId, void *yourPtr) |
virtual void | socketFailure (int connId, void *yourPtr, int code) |
virtual void | socketStatusArrived (int connId, void *yourPtr, TCPStatusInfo *status) |
Public Member Functions inherited from TopologyVis | |
TopologyVis () | |
void | showOverlayNeighborArrow (const NodeHandle &neighbor, bool flush=true, const char *displayString=NULL) |
Draws an arrow from this node to neighbor. | |
void | deleteOverlayNeighborArrow (const NodeHandle &neighbor) |
Removes an arrow from this node to neighbor. |
Protected Member Functions | |
virtual void | purgeVectors (void) |
delete all information/messages caching vectors, used for restarting overlay or finish() | |
bool | handleRpcCall (BaseCallMessage *msg) |
Processes Remote-Procedure-Call invocation messages. | |
void | handlePastryJoinCall (PastryJoinCall *call) |
void | handleRequestStateCall (RequestStateCall *call) |
void | handleRequestRepairCall (RequestRepairCall *call) |
void | handleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt) |
This method is called if an RPC response has been received. | |
void | handlePastryJoinResponse (PastryJoinResponse *response) |
void | handleRequestStateResponse (RequestStateResponse *response) |
void | handleRequestRepairResponse (RequestRepairResponse *response) |
void | handleRequestLeafSetResponse (RequestLeafSetResponse *response) |
void | handleRequestRoutingRowResponse (RequestRoutingRowResponse *response) |
void | handleRpcTimeout (BaseCallMessage *call, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &key) |
This method is called if an RPC timeout has been reached. | |
virtual void | changeState (int toState) |
changes node state | |
virtual bool | recursiveRoutingHook (const TransportAddress &dest, BaseRouteMessage *msg) |
Hook for forwarded message in recursive lookup mode. | |
void | iterativeJoinHook (BaseOverlayMessage *msg, bool incrHopCount) |
Protected Member Functions inherited from BasePastry | |
void | handleRequestLeafSetCall (RequestLeafSetCall *call) |
void | handleRequestRoutingRowCall (RequestRoutingRowCall *call) |
PastryStateMessage * | createStateMessage (enum PastryStateMsgType type=PASTRY_STATE_STD, simtime_t timestamp=-1, int16_t row=-1, bool lastHop=false) |
virtual void | checkProxCache (void)=0 |
checks whether proxCache is complete, takes appropriate actions depending on the protocol state | |
void | baseInit (void) |
initializes parameters and variables used in both Bamboo and Pastry | |
void | baseChangeState (int) |
changes node state, but leaves specific behavour, scheduling tasks in particular, to the inheriting protocols | |
OverlayKey | distance (const OverlayKey &x, const OverlayKey &y, bool useAlternative=false) const |
This method should implement the distance between two keys. | |
void | prePing (const PastryStateMessage *stateMsg) |
ping all nodes in a given state message. | |
void | pingNodes (void) |
ping all nodes in the pastry state message pointed to by private member stateCache | |
void | determineAliveTable (const PastryStateMessage *stateMsg) |
change the aliveTable to match the given stateMsg. | |
void | newLeafs (void) |
Pastry API: send newLeafs() to application if enabled. | |
Protected Member Functions inherited from BaseOverlay | |
int | numInitStages () const |
Sets init stage. | |
void | bindToPort (int port) |
Tells UDP we want to get all packets arriving on the given port. | |
virtual void | route (const OverlayKey &key, CompType destComp, CompType srcComp, cPacket *msg, const std::vector< TransportAddress > &sourceRoute=TransportAddress::UNSPECIFIED_NODES, RoutingType routingType=DEFAULT_ROUTING) |
Routes message through overlay. | |
void | callDeliver (BaseOverlayMessage *msg, const OverlayKey &destKey) |
Calls deliver function in application. | |
void | callForward (const OverlayKey &key, BaseRouteMessage *msg, const NodeHandle &nextHopNode) |
Calls forward function in application. | |
void | callUpdate (const NodeHandle &node, bool joined) |
Informs application about state changes of nodes or newly joined nodes. | |
void | handleMessage (cMessage *msg) |
Checks for message type and calls corresponding method. | |
void | handleBaseOverlayMessage (BaseOverlayMessage *msg, const OverlayKey &destKey=OverlayKey::UNSPECIFIED_KEY) |
Handles a BaseOverlayMessage | |
virtual void | handleAppMessage (cMessage *msg) |
Processes "timer" self-messages. | |
virtual void | receiveChangeNotification (int category, const cPolymorphic *details) |
callback-method for events at the NotificationBoard | |
virtual void | handleTransportAddressChangedNotification () |
This method gets call if the node has a new TransportAddress (IP address) because he changed his access network. | |
virtual void | handleNodeLeaveNotification () |
This method gets call **.gracefulLeaveDelay seconds before it is killed. | |
virtual void | handleNodeGracefulLeaveNotification () |
This method gets call **.gracefulLeaveDelay seconds before it is killed if this node is among the gracefulLeaveProbability nodes. | |
virtual void | recordOverlaySentStats (BaseOverlayMessage *msg) |
Collect overlay specific sent messages statistics. | |
void | setOverlayReady (bool ready) |
Sets the overlay ready icon and register/deregisters the node at the GlobalNodeList. | |
virtual void | removeLookup (AbstractLookup *lookup) |
Removes the abstract lookup instance. | |
virtual void | joinOverlay () |
Join the overlay with a given nodeID in thisNode.key. | |
virtual void | joinForeignPartition (const NodeHandle &node) |
Join another overlay partition with the given node as bootstrap node. | |
virtual bool | handleFailedNode (const TransportAddress &failed) |
Handles a failed node. | |
virtual void | lookupRpc (LookupCall *call) |
virtual void | nextHopRpc (NextHopCall *call) |
void | countFindNodeCall (const FindNodeCall *call) |
void | countFailedNodeCall (const FailedNodeCall *call) |
bool | internalHandleRpcCall (BaseCallMessage *msg) |
Handles internal rpc requests. | |
void | internalHandleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt) |
Handles rpc responses internal in base classes | |
void | internalHandleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey) |
Handles rpc timeouts internal in base classes | |
void | internalSendRouteRpc (BaseRpcMessage *message, const OverlayKey &destKey, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType) |
CompType | getThisCompType () |
Return the component type of this module. | |
Protected Member Functions inherited from BaseRpc | |
void | initRpcs () |
Initializes Remote-Procedure state. | |
void | finishRpcs () |
Deinitializes Remote-Procedure state. | |
virtual void | internalHandleRpcMessage (BaseRpcMessage *msg) |
Handles incoming rpc messages and delegates them to the corresponding listeners or handlers. | |
uint32_t | sendRouteRpcCall (CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Routes a Remote-Procedure-Call message to an OverlayKey. | |
uint32_t | sendRouteRpcCall (CompType destComp, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Routes a Remote-Procedure-Call message to an OverlayKey. | |
uint32_t | sendRouteRpcCall (CompType destComp, const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Sends a Remote-Procedure-Call message using the overlay's UDP port This replaces ROUTE_DIRECT calls! | |
uint32_t | sendUdpRpcCall (const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Sends a Remote-Procedure-Call message to the underlay | |
uint32_t | sendInternalRpcCall (CompType destComp, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL) |
Sends an internal Remote-Procedure-Call between two tiers | |
void | cancelRpcMessage (uint32_t nonce) |
Cancels a Remote-Procedure-Call. | |
void | cancelAllRpcs () |
Cancels all RPCs. | |
void | sendRpcResponse (TransportType transportType, CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *call, BaseResponseMessage *response) |
Send Remote-Procedure response message and deletes call message. | |
void | sendRpcResponse (BaseCallMessage *call, BaseResponseMessage *response) |
Send Remote-Procedure response message to UDP and deletes call message. | |
int | pingNode (const TransportAddress &dest, simtime_t timeout=-1, int retries=0, cPolymorphic *context=NULL, const char *caption="PING", RpcListener *rpcListener=NULL, int rpcId=-1, TransportType transportType=INVALID_TRANSPORT) |
ping a node by its TransportAddress | |
virtual void | pingTimeout (PingCall *pingCall, const TransportAddress &dest, cPolymorphic *context, int rpcId) |
bool | internalHandleMessage (cMessage *msg) |
Protected Member Functions inherited from RpcListener | |
virtual void | handleRpcResponse (BaseResponseMessage *msg, const RpcState &rpcState, simtime_t rtt) |
This method is called if an RPC response has been received. | |
virtual void | handleRpcTimeout (const RpcState &rpcState) |
This method is called if an RPC timeout has been reached. | |
Protected Member Functions inherited from BaseTcpSupport | |
void | handleTCPMessage (cMessage *msg) |
Member function to handle incoming TCP messages. | |
void | bindAndListenTcp (int port) |
Member function to bind service to the specified port and listen afterwards. | |
bool | isAlreadyConnected (TransportAddress address) |
Member function to check if the service is already connected. | |
void | establishTcpConnection (TransportAddress address) |
Member function to establish a connection to the specified node. | |
void | sendTcpData (cPacket *msg, TransportAddress address) |
Member function to send TCP data to the specified node. | |
virtual void | handleConnectionEvent (EvCode code, TransportAddress address) |
Member function to handle passive connection events. | |
virtual void | handleDataReceived (TransportAddress address, cPacket *msg, bool urgent) |
Member function to handle incoming data. | |
virtual void | handleIncomingConnection (TransportAddress address) |
Member function to handle newly opened connections. | |
void | closeTcpConnection (TransportAddress address) |
Member function to close an established connection. | |
void | setTcpOut (cGate *gate) |
Member function to set local gate towards the TCP module during init phase. | |
cGate * | getTcpOut () |
Member function to get local gate towards the TCP module. | |
Protected Member Functions inherited from TopologyVis | |
void | initVis (cModule *terminal) |
Protected Attributes | |
std::vector< PastryStateMsgHandle > | stReceived |
State messages to process during join. | |
std::vector < PastryStateMsgHandle > ::iterator | stReceivedPos |
std::vector< TransportAddress > | notifyList |
List of nodes to notify after join. | |
std::vector< PastrySendState * > | sendStateWait |
Protected Attributes inherited from BasePastry | |
uint32_t | bitsPerDigit |
uint32_t | numberOfLeaves |
uint32_t | numberOfNeighbors |
double | readyWaitAmount |
double | joinTimeoutAmount |
double | repairTimeout |
bool | enableNewLeafs |
bool | useRegularNextHop |
bool | alwaysSendUpdate |
bool | optimizeLookup |
bool | proximityNeighborSelection |
simtime_t | nearNodeRtt |
bool | nearNodeImproved |
bool | periodicMaintenance |
TransportAddress * | leaf2ask |
TransportAddress | bootstrapNode |
TransportAddress | nearNode |
simtime_t | lastStateChange |
PastryStateMsgHandle | stateCache |
Handle for processing a single state message. | |
std::queue< PastryStateMsgHandle > | stateCacheQueue |
Queue of state messages waiting to be processed in READY state. | |
PastryStateMsgProximity | aliveTable |
Early update of leaf set: helper structure for marking known-dead nodes. | |
uint32_t | joinHopCount |
cMessage * | readyWait |
cMessage * | joinUpdateWait |
PastryRoutingTable * | routingTable |
PastryLeafSet * | leafSet |
PastryNeighborhoodSet * | neighborhoodSet |
Protected Attributes inherited from BaseOverlay | |
int | numAppDataForwarded |
number of forwarded app data packets | |
int | bytesAppDataForwarded |
number of forwarded app data bytes at out-gate | |
int | numAppLookupForwarded |
number of forwarded app lookup packets | |
int | bytesAppLookupForwarded |
number of forwarded app lookup bytes at out-gate | |
int | numMaintenanceForwarded |
number of forwarded maintenance packets | |
int | bytesMaintenanceForwarded |
number of forwarded maintenance bytes at out-gate | |
int | numFindNodeSent |
int | bytesFindNodeSent |
int | numFindNodeResponseSent |
int | bytesFindNodeResponseSent |
int | numFailedNodeSent |
int | bytesFailedNodeSent |
int | numFailedNodeResponseSent |
int | bytesFailedNodeResponseSent |
std::vector< HopDelayRecord * > | singleHopDelays |
simtime_t | creationTime |
simtime when the node has been created | |
GlobalNodeList * | globalNodeList |
pointer to GlobalNodeList in this node | |
NotificationBoard * | notificationBoard |
pointer to NotificationBoard in this node | |
UnderlayConfigurator * | underlayConfigurator |
pointer to UnderlayConfigurator in this node | |
BootstrapList * | bootstrapList |
pointer to the BootstrapList module | |
GlobalParameters * | globalParameters |
pointer to the GlobalParameters module | |
uint32_t | overlayId |
identifies the overlay this node belongs to (used for multiple overlays) | |
bool | debugOutput |
debug output ? | |
RoutingType | defaultRoutingType |
bool | useCommonAPIforward |
forward messages to applications? | |
bool | collectPerHopDelay |
collect delay for single hops | |
bool | routeMsgAcks |
send ACK when receiving route message | |
uint32_t | recNumRedundantNodes |
numRedundantNodes for recursive routing | |
bool | recordRoute |
record visited hops on route | |
bool | drawOverlayTopology |
bool | rejoinOnFailure |
bool | sendRpcResponseToLastHop |
needed by KBR protocols for NAT support | |
bool | dropFindNodeAttack |
if node is malicious, it tries a findNode attack | |
bool | isSiblingAttack |
if node is malicious, it tries a isSibling attack | |
bool | invalidNodesAttack |
if node is malicious, it tries a invalidNode attack | |
bool | dropRouteMessageAttack |
if node is malicious, it drops all received BaseRouteMessages | |
int | localPort |
used UDP-port | |
int | hopCountMax |
maximum hop count | |
bool | measureAuthBlock |
if true, measure the overhead of signatures in rpc messages | |
bool | restoreContext |
if true, a node rejoins with its old nodeId and malicious state | |
int | numDropped |
number of dropped packets | |
int | bytesDropped |
number of dropped bytes | |
cOutVector | delayVector |
statistical output vector for packet-delays | |
cOutVector | hopCountVector |
statistical output vector for hop-counts | |
States | state |
IterativeLookupConfiguration | iterativeLookupConfig |
RecursiveLookupConfiguration | recursiveLookupConfig |
LookupSet | lookups |
bool | kbr |
set this to true, if the overlay provides KBR services | |
Protected Attributes inherited from BaseRpc | |
NodeHandle | thisNode |
NodeHandle to this node. | |
BaseOverlay * | overlay |
bool | debugOutput |
debug output ? | |
GlobalStatistics * | globalStatistics |
pointer to GlobalStatistics module in this node | |
CompType | thisCompType |
NeighborCache * | neighborCache |
pointer to the neighbor cache | |
CryptoModule * | cryptoModule |
pointer to CryptoModule | |
int | numPingSent |
int | bytesPingSent |
int | numPingResponseSent |
int | bytesPingResponseSent |
Protected Attributes inherited from TopologyVis | |
cModule * | thisTerminal |
GlobalNodeList * | globalNodeList |
pointer to corresponding node |
Private Member Functions | |
void | clearVectors () |
void | doSecondStage (void) |
do the second stage of initialization as described in the paper | |
void | doRoutingTableMaintenance () |
periodic routing table maintenance requests the corresponding routing table row from one node in each row | |
bool | handleFailedNode (const TransportAddress &failed) |
notifies leafset and routingtable of a failed node and sends out a repair request if possible | |
void | checkProxCache (void) |
checks whether proxCache is complete, takes appropriate actions depending on the protocol state | |
void | processState (void) |
bool | mergeState (void) |
void | endProcessingState (void) |
void | doJoinUpdate (void) |
send updated state to all nodes when entering ready state | |
virtual void | joinOverlay () |
void | sendStateDelayed (const TransportAddress &destination) |
send a standard state message with a small delay |
Private Attributes | |
simtime_t | secondStageInterval |
simtime_t | routingTableMaintenanceInterval |
simtime_t | discoveryTimeoutAmount |
bool | partialJoinPath |
uint16_t | discoveryModeProbedNodes |
int | depth |
int | updateCounter |
bool | minimalJoinState |
bool | useDiscovery |
bool | useSecondStage |
bool | useRoutingTableMaintenance |
bool | sendStateAtLeafsetRepair |
bool | pingBeforeSecondStage |
bool | overrideOldPastry |
bool | overrideNewPastry |
cMessage * | secondStageWait |
cMessage * | ringCheck |
cMessage * | discoveryTimeout |
cMessage * | repairTaskTimeout |
|
virtual |
Definition at line 39 of file Pastry.cc.
|
protectedvirtual |
changes node state
toState | state to change to |
Reimplemented from BasePastry.
Definition at line 161 of file Pastry.cc.
Referenced by checkProxCache(), handleStateMessage(), handleTimerEvent(), and joinOverlay().
|
private |
checks whether proxCache is complete, takes appropriate actions depending on the protocol state
Definition at line 939 of file Pastry.cc.
|
private |
Definition at line 52 of file Pastry.cc.
Referenced by purgeVectors(), and ~Pastry().
|
private |
send updated state to all nodes when entering ready state
Definition at line 761 of file Pastry.cc.
Referenced by handleTimerEvent().
|
private |
periodic routing table maintenance requests the corresponding routing table row from one node in each row
Definition at line 859 of file Pastry.cc.
Referenced by handleTimerEvent().
|
private |
do the second stage of initialization as described in the paper
Definition at line 804 of file Pastry.cc.
Referenced by handleTimerEvent().
|
private |
Definition at line 1070 of file Pastry.cc.
Referenced by checkProxCache(), and processState().
|
private |
notifies leafset and routingtable of a failed node and sends out a repair request if possible
failed | the failed node |
Definition at line 886 of file Pastry.cc.
Referenced by handlePastryJoinCall(), and recursiveRoutingHook().
|
protected |
Definition at line 382 of file Pastry.cc.
Referenced by handleRpcCall().
|
protected |
Definition at line 594 of file Pastry.cc.
Referenced by handleRpcResponse().
|
protectedvirtual |
Reimplemented from BasePastry.
Definition at line 623 of file Pastry.cc.
Referenced by handleRpcResponse().
|
protected |
Definition at line 474 of file Pastry.cc.
Referenced by handleRpcCall().
|
protected |
Definition at line 504 of file Pastry.cc.
Referenced by handleRpcResponse().
|
protectedvirtual |
Reimplemented from BasePastry.
Definition at line 654 of file Pastry.cc.
Referenced by handleRpcResponse().
|
protected |
Definition at line 444 of file Pastry.cc.
Referenced by handleRpcCall().
|
protected |
Definition at line 608 of file Pastry.cc.
Referenced by handleRpcResponse().
|
protectedvirtual |
Processes Remote-Procedure-Call invocation messages.
This method should be overloaded when the overlay provides RPC functionality.
Reimplemented from BasePastry.
Definition at line 358 of file Pastry.cc.
|
protectedvirtual |
This method is called if an RPC response has been received.
msg | The response message. |
context | Pointer to an optional state object. The object has to be handled/deleted by the handleRpcResponse() code |
rpcId | The RPC id. |
rtt | The Round-Trip-Time of this RPC |
Reimplemented from BasePastry.
Definition at line 519 of file Pastry.cc.
|
protectedvirtual |
This method is called if an RPC timeout has been reached.
msg | The original RPC message. |
dest | The destination node |
context | Pointer to an optional state object. The object has to be handled/deleted by the handleRpcResponse() code |
rpcId | The RPC id. |
destKey | the destination OverlayKey |
Reimplemented from BasePastry.
Definition at line 575 of file Pastry.cc.
|
virtual |
processes state messages, merging with own state tables
msg | the pastry state message |
Implements BasePastry.
Definition at line 1193 of file Pastry.cc.
Referenced by handlePastryJoinResponse(), handleRequestRepairResponse(), handleRequestStateResponse(), and handleUDPMessage().
|
virtual |
Reimplemented from BaseRpc.
Definition at line 252 of file Pastry.cc.
|
virtual |
Processes messages from underlay.
msg | Message from UDP |
Reimplemented from BaseOverlay.
Definition at line 339 of file Pastry.cc.
|
virtual |
Initializes derived-class-attributes.
Initializes derived-class-attributes, called by BaseOverlay::initialize(). By default this method is called once. If more stages are needed one can overload numInitStages() and add more stages.
stage | the init stage |
Reimplemented from BaseOverlay.
Definition at line 91 of file Pastry.cc.
|
protectedvirtual |
Reimplemented from BasePastry.
Definition at line 729 of file Pastry.cc.
|
privatevirtual |
Definition at line 145 of file Pastry.cc.
Referenced by checkProxCache(), and handleStateMessage().
|
private |
Definition at line 1101 of file Pastry.cc.
Referenced by checkProxCache(), handleStateMessage(), and processState().
|
virtual |
Reimplemented from BaseRpc.
Definition at line 232 of file Pastry.cc.
|
private |
Definition at line 1410 of file Pastry.cc.
Referenced by checkProxCache(), doSecondStage(), endProcessingState(), handleStateMessage(), and handleTimerEvent().
|
protectedvirtual |
delete all information/messages caching vectors, used for restarting overlay or finish()
Reimplemented from BasePastry.
Definition at line 73 of file Pastry.cc.
Referenced by changeState().
|
protectedvirtual |
Hook for forwarded message in recursive lookup mode.
This hook is called just before a message is forwarded to a next hop or if the message is at its destination just before it is sent to the app. Default implementation just returns true. This hook can for example be used to detect failed nodes and call handleFailedNode() before the actual forwarding takes place.
dest | destination node |
msg | message to send |
Reimplemented from BaseOverlay.
Definition at line 696 of file Pastry.cc.
|
private |
send a standard state message with a small delay
destination | destination node |
Definition at line 330 of file Pastry.cc.
Referenced by checkProxCache().
|
private |
Definition at line 139 of file Pastry.h.
Referenced by changeState(), handleRequestRoutingRowResponse(), and handleTimerEvent().
|
private |
Definition at line 138 of file Pastry.h.
Referenced by changeState(), handleRequestLeafSetResponse(), handleRequestRoutingRowResponse(), and handleTimerEvent().
|
private |
Definition at line 155 of file Pastry.h.
Referenced by handleRequestLeafSetResponse(), handleRequestRoutingRowResponse(), handleTimerEvent(), initializeOverlay(), and ~Pastry().
|
private |
Definition at line 135 of file Pastry.h.
Referenced by changeState(), handleRequestLeafSetResponse(), handleRequestRoutingRowResponse(), and initializeOverlay().
|
private |
Definition at line 143 of file Pastry.h.
Referenced by handlePastryJoinCall(), initializeOverlay(), iterativeJoinHook(), and recursiveRoutingHook().
|
protected |
List of nodes to notify after join.
Definition at line 125 of file Pastry.h.
Referenced by changeState(), clearVectors(), doJoinUpdate(), and doSecondStage().
|
private |
Definition at line 151 of file Pastry.h.
Referenced by initializeOverlay().
|
private |
Definition at line 150 of file Pastry.h.
Referenced by initializeOverlay().
|
private |
Definition at line 136 of file Pastry.h.
Referenced by handleTimerEvent(), and initializeOverlay().
|
private |
Definition at line 148 of file Pastry.h.
Referenced by handleStateMessage(), initializeOverlay(), and processState().
|
private |
Definition at line 156 of file Pastry.h.
Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Pastry().
|
private |
Definition at line 134 of file Pastry.h.
Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Pastry().
|
private |
Definition at line 133 of file Pastry.h.
Referenced by changeState(), and initializeOverlay().
|
private |
Definition at line 153 of file Pastry.h.
Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Pastry().
|
private |
Definition at line 147 of file Pastry.h.
Referenced by handleFailedNode(), and initializeOverlay().
|
protected |
Definition at line 127 of file Pastry.h.
Referenced by handleTimerEvent(), purgeVectors(), and sendStateDelayed().
|
protected |
State messages to process during join.
Definition at line 119 of file Pastry.h.
Referenced by checkProxCache(), clearVectors(), doJoinUpdate(), handleStateMessage(), handleTimerEvent(), and mergeState().
|
protected |
Definition at line 120 of file Pastry.h.
Referenced by checkProxCache(), clearVectors(), handleStateMessage(), and handleTimerEvent().
|
private |
Definition at line 141 of file Pastry.h.
Referenced by checkProxCache(), and initializeOverlay().
|
private |
Definition at line 144 of file Pastry.h.
Referenced by initializeOverlay(), joinOverlay(), and ~Pastry().
|
private |
Definition at line 146 of file Pastry.h.
Referenced by changeState(), and initializeOverlay().
|
private |
Definition at line 145 of file Pastry.h.
Referenced by changeState(), and initializeOverlay().