C# Class TSystems.RELOAD.Topology.TopologyPlugin.RoutingTable

Afficher le fichier Open project: RELOAD-NET/RELOAD.NET

Méthodes publiques

Méthode Description
AddFinger ( Node testFinger, NodeState state ) : void

Adds a new finger and sets its state. Note, only fingers for which we received a update will be used for routing.

AddLeavingNode ( NodeId OriginatorId ) : void
AddNode ( Node node ) : void
AttachFingers ( ) : List

JP also needs to populate its finger table (for the Chord based DHT). It issues an Attach to a variety of locations around the overlay. see RELOAD base -17 p.129

AttachToAllNeighbors ( ) : void

Attach to all members of the successor and predecessor table

Conn2Route ( ) : void

This method should only be executed after enrichment of the connection table while joining. It transfers all connection obtain yet to the routing table. see base -18 p.106 4. JP MUST enter all the peers it has contacted into its routing table.

FindNextHopTo ( NodeId TargetId, bool fIncluding, bool fExludeMe ) : Node
GetApproved ( List inputList ) : List
GetApprovedPredecessor ( ) : NodeId
GetApprovedSuccessor ( ) : NodeId
GetCandidates ( NodeId nodeid ) : List

Returns the ice candidates stored in a dicationary along with a nodeid

GetNode ( NodeId node_id ) : Node
GetNodeState ( NodeId nodeid ) : NodeState

We need the information if a node (nodeid) has already been attached to and is valid. This is stored in the routing table

GetPing ( NodeId nodeid ) : bool
GetPredecessor ( int index ) : Node
GetPredecessorCount ( bool only_approved ) : int
GetPredecessorId ( int index ) : NodeId
GetStatusShortLetter ( NodeId nodeid ) : char
GetSuccessor ( int index ) : Node
GetSuccessorCount ( bool only_approved ) : int
GetSuccessorId ( int index ) : NodeId
GotUpdatesFrom ( NodeId nodeid ) : bool
IsAttached ( NodeId nodeid ) : bool
IsWaitForJoinAnsw ( NodeId nodeid ) : bool
Leave ( NodeId nodeId ) : bool
NeighborsFromTotal ( List total_update_list, bool fSuccessors ) : List
NodeWeNeed ( NodeId nodeId ) : bool
PrintNeigborState ( ) : void
Reset ( ) : void
RoutingTable ( Node local_node, Machine machine ) : System
SendUpdateToAllNeighbors ( ) : void

Sends and update to all members of the successor and predecessor table

SetFingerState ( NodeId finger, NodeState state ) : void
isFinger ( NodeId testFinger ) : bool

Returns true, if the tested Finger is needed for fingertable

isFinger ( NodeId testFinger, FTableEntry &finger ) : bool

Returns true if attaching Node should be added to finger table.

isNewNeighbour ( NodeId attacher ) : bool
removeDuplicates ( List inputList ) : List

Removes duplicates in any list of node id's

rmDuplicateFingers ( List fingers ) : List

Private Methods

Méthode Description
GetClosestPrecedingFinger ( NodeId key ) : Node
GetClosestPrecedingNode ( NodeId key ) : Node
IsAttachedToAllNeighbors ( ) : bool
IsChangedList ( List m_old_list, List m_new_list ) : bool
Merge ( NodeId originator, UpdateReqAns req_answ, System.Boolean ForceSendUpdate ) : IEnumerator

If any peer sends an update we merge this information with our local tables

SetNodeState ( NodeId nodeId, NodeState nodestate ) : void
SetPinging ( NodeId nodeId, bool ping, bool success ) : void
SetWaitForJoinAnsw ( NodeId nodeId, System.Boolean fTrue ) : void

Method Details

AddFinger() public méthode

Adds a new finger and sets its state. Note, only fingers for which we received a update will be used for routing.
public AddFinger ( Node testFinger, NodeState state ) : void
testFinger Node The remote finger
state NodeState Normally, attached because update has no Node ///
Résultat void

AddLeavingNode() public méthode

public AddLeavingNode ( NodeId OriginatorId ) : void
OriginatorId TSystems.RELOAD.Utils.NodeId
Résultat void

AddNode() public méthode

public AddNode ( Node node ) : void
node Node
Résultat void

AttachFingers() public méthode

JP also needs to populate its finger table (for the Chord based DHT). It issues an Attach to a variety of locations around the overlay. see RELOAD base -17 p.129
public AttachFingers ( ) : List
Résultat List

AttachToAllNeighbors() public méthode

Attach to all members of the successor and predecessor table
public AttachToAllNeighbors ( ) : void
Résultat void

Conn2Route() public méthode

This method should only be executed after enrichment of the connection table while joining. It transfers all connection obtain yet to the routing table. see base -18 p.106 4. JP MUST enter all the peers it has contacted into its routing table.
public Conn2Route ( ) : void
Résultat void

FindNextHopTo() public méthode

public FindNextHopTo ( NodeId TargetId, bool fIncluding, bool fExludeMe ) : Node
TargetId TSystems.RELOAD.Utils.NodeId
fIncluding bool
fExludeMe bool
Résultat Node

GetApproved() public méthode

public GetApproved ( List inputList ) : List
inputList List
Résultat List

GetApprovedPredecessor() public méthode

public GetApprovedPredecessor ( ) : NodeId
Résultat TSystems.RELOAD.Utils.NodeId

GetApprovedSuccessor() public méthode

public GetApprovedSuccessor ( ) : NodeId
Résultat TSystems.RELOAD.Utils.NodeId

GetCandidates() public méthode

Returns the ice candidates stored in a dicationary along with a nodeid
public GetCandidates ( NodeId nodeid ) : List
nodeid TSystems.RELOAD.Utils.NodeId The Node Id
Résultat List

GetNode() public méthode

public GetNode ( NodeId node_id ) : Node
node_id TSystems.RELOAD.Utils.NodeId
Résultat Node

GetNodeState() public méthode

We need the information if a node (nodeid) has already been attached to and is valid. This is stored in the routing table
public GetNodeState ( NodeId nodeid ) : NodeState
nodeid TSystems.RELOAD.Utils.NodeId The Node Id
Résultat NodeState

GetPing() public méthode

public GetPing ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
Résultat bool

GetPredecessor() public méthode

public GetPredecessor ( int index ) : Node
index int
Résultat Node

GetPredecessorCount() public méthode

public GetPredecessorCount ( bool only_approved ) : int
only_approved bool
Résultat int

GetPredecessorId() public méthode

public GetPredecessorId ( int index ) : NodeId
index int
Résultat TSystems.RELOAD.Utils.NodeId

GetStatusShortLetter() public méthode

public GetStatusShortLetter ( NodeId nodeid ) : char
nodeid TSystems.RELOAD.Utils.NodeId
Résultat char

GetSuccessor() public méthode

public GetSuccessor ( int index ) : Node
index int
Résultat Node

GetSuccessorCount() public méthode

public GetSuccessorCount ( bool only_approved ) : int
only_approved bool
Résultat int

GetSuccessorId() public méthode

public GetSuccessorId ( int index ) : NodeId
index int
Résultat TSystems.RELOAD.Utils.NodeId

GotUpdatesFrom() public méthode

public GotUpdatesFrom ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
Résultat bool

IsAttached() public méthode

public IsAttached ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
Résultat bool

IsWaitForJoinAnsw() public méthode

public IsWaitForJoinAnsw ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
Résultat bool

Leave() public méthode

public Leave ( NodeId nodeId ) : bool
nodeId TSystems.RELOAD.Utils.NodeId
Résultat bool

NeighborsFromTotal() public méthode

public NeighborsFromTotal ( List total_update_list, bool fSuccessors ) : List
total_update_list List
fSuccessors bool
Résultat List

NodeWeNeed() public méthode

public NodeWeNeed ( NodeId nodeId ) : bool
nodeId TSystems.RELOAD.Utils.NodeId
Résultat bool

PrintNeigborState() public méthode

public PrintNeigborState ( ) : void
Résultat void

Reset() public méthode

public Reset ( ) : void
Résultat void

RoutingTable() public méthode

public RoutingTable ( Node local_node, Machine machine ) : System
local_node Node
machine Machine
Résultat System

SendUpdateToAllNeighbors() public méthode

Sends and update to all members of the successor and predecessor table
public SendUpdateToAllNeighbors ( ) : void
Résultat void

SetFingerState() public méthode

public SetFingerState ( NodeId finger, NodeState state ) : void
finger TSystems.RELOAD.Utils.NodeId
state NodeState
Résultat void

isFinger() public méthode

Returns true, if the tested Finger is needed for fingertable
public isFinger ( NodeId testFinger ) : bool
testFinger TSystems.RELOAD.Utils.NodeId
Résultat bool

isFinger() public méthode

Returns true if attaching Node should be added to finger table.
public isFinger ( NodeId testFinger, FTableEntry &finger ) : bool
testFinger TSystems.RELOAD.Utils.NodeId The attaching node
finger FTableEntry The first Finger Table entry machting the attaching node.
Résultat bool

isNewNeighbour() public méthode

public isNewNeighbour ( NodeId attacher ) : bool
attacher TSystems.RELOAD.Utils.NodeId
Résultat bool

removeDuplicates() public méthode

Removes duplicates in any list of node id's
public removeDuplicates ( List inputList ) : List
inputList List A list containing node id's
Résultat List

rmDuplicateFingers() public méthode

public rmDuplicateFingers ( List fingers ) : List
fingers List
Résultat List