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

ファイルを表示 Open project: RELOAD-NET/RELOAD.NET

Public Methods

Method 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

Method 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 method

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 ///
return void

AddLeavingNode() public method

public AddLeavingNode ( NodeId OriginatorId ) : void
OriginatorId TSystems.RELOAD.Utils.NodeId
return void

AddNode() public method

public AddNode ( Node node ) : void
node Node
return void

AttachFingers() public method

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
return List

AttachToAllNeighbors() public method

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

Conn2Route() public method

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
return void

FindNextHopTo() public method

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

GetApproved() public method

public GetApproved ( List inputList ) : List
inputList List
return List

GetApprovedPredecessor() public method

public GetApprovedPredecessor ( ) : NodeId
return TSystems.RELOAD.Utils.NodeId

GetApprovedSuccessor() public method

public GetApprovedSuccessor ( ) : NodeId
return TSystems.RELOAD.Utils.NodeId

GetCandidates() public method

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
return List

GetNode() public method

public GetNode ( NodeId node_id ) : Node
node_id TSystems.RELOAD.Utils.NodeId
return Node

GetNodeState() public method

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
return NodeState

GetPing() public method

public GetPing ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
return bool

GetPredecessor() public method

public GetPredecessor ( int index ) : Node
index int
return Node

GetPredecessorCount() public method

public GetPredecessorCount ( bool only_approved ) : int
only_approved bool
return int

GetPredecessorId() public method

public GetPredecessorId ( int index ) : NodeId
index int
return TSystems.RELOAD.Utils.NodeId

GetStatusShortLetter() public method

public GetStatusShortLetter ( NodeId nodeid ) : char
nodeid TSystems.RELOAD.Utils.NodeId
return char

GetSuccessor() public method

public GetSuccessor ( int index ) : Node
index int
return Node

GetSuccessorCount() public method

public GetSuccessorCount ( bool only_approved ) : int
only_approved bool
return int

GetSuccessorId() public method

public GetSuccessorId ( int index ) : NodeId
index int
return TSystems.RELOAD.Utils.NodeId

GotUpdatesFrom() public method

public GotUpdatesFrom ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
return bool

IsAttached() public method

public IsAttached ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
return bool

IsWaitForJoinAnsw() public method

public IsWaitForJoinAnsw ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
return bool

Leave() public method

public Leave ( NodeId nodeId ) : bool
nodeId TSystems.RELOAD.Utils.NodeId
return bool

NeighborsFromTotal() public method

public NeighborsFromTotal ( List total_update_list, bool fSuccessors ) : List
total_update_list List
fSuccessors bool
return List

NodeWeNeed() public method

public NodeWeNeed ( NodeId nodeId ) : bool
nodeId TSystems.RELOAD.Utils.NodeId
return bool

PrintNeigborState() public method

public PrintNeigborState ( ) : void
return void

Reset() public method

public Reset ( ) : void
return void

RoutingTable() public method

public RoutingTable ( Node local_node, Machine machine ) : System
local_node Node
machine Machine
return System

SendUpdateToAllNeighbors() public method

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

SetFingerState() public method

public SetFingerState ( NodeId finger, NodeState state ) : void
finger TSystems.RELOAD.Utils.NodeId
state NodeState
return void

isFinger() public method

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

isFinger() public method

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.
return bool

isNewNeighbour() public method

public isNewNeighbour ( NodeId attacher ) : bool
attacher TSystems.RELOAD.Utils.NodeId
return bool

removeDuplicates() public method

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

rmDuplicateFingers() public method

public rmDuplicateFingers ( List fingers ) : List
fingers List
return List