C# Класс TSystems.RELOAD.Topology.TopologyPlugin.RoutingTable

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddFinger() публичный Метод

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 ///
Результат void

AddLeavingNode() публичный Метод

public AddLeavingNode ( NodeId OriginatorId ) : void
OriginatorId TSystems.RELOAD.Utils.NodeId
Результат void

AddNode() публичный Метод

public AddNode ( Node node ) : void
node Node
Результат void

AttachFingers() публичный Метод

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
Результат List

AttachToAllNeighbors() публичный Метод

Attach to all members of the successor and predecessor table
public AttachToAllNeighbors ( ) : void
Результат void

Conn2Route() публичный Метод

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
Результат void

FindNextHopTo() публичный Метод

public FindNextHopTo ( NodeId TargetId, bool fIncluding, bool fExludeMe ) : Node
TargetId TSystems.RELOAD.Utils.NodeId
fIncluding bool
fExludeMe bool
Результат Node

GetApproved() публичный Метод

public GetApproved ( List inputList ) : List
inputList List
Результат List

GetApprovedPredecessor() публичный Метод

public GetApprovedPredecessor ( ) : NodeId
Результат TSystems.RELOAD.Utils.NodeId

GetApprovedSuccessor() публичный Метод

public GetApprovedSuccessor ( ) : NodeId
Результат TSystems.RELOAD.Utils.NodeId

GetCandidates() публичный Метод

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
Результат List

GetNode() публичный Метод

public GetNode ( NodeId node_id ) : Node
node_id TSystems.RELOAD.Utils.NodeId
Результат Node

GetNodeState() публичный Метод

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
Результат NodeState

GetPing() публичный Метод

public GetPing ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
Результат bool

GetPredecessor() публичный Метод

public GetPredecessor ( int index ) : Node
index int
Результат Node

GetPredecessorCount() публичный Метод

public GetPredecessorCount ( bool only_approved ) : int
only_approved bool
Результат int

GetPredecessorId() публичный Метод

public GetPredecessorId ( int index ) : NodeId
index int
Результат TSystems.RELOAD.Utils.NodeId

GetStatusShortLetter() публичный Метод

public GetStatusShortLetter ( NodeId nodeid ) : char
nodeid TSystems.RELOAD.Utils.NodeId
Результат char

GetSuccessor() публичный Метод

public GetSuccessor ( int index ) : Node
index int
Результат Node

GetSuccessorCount() публичный Метод

public GetSuccessorCount ( bool only_approved ) : int
only_approved bool
Результат int

GetSuccessorId() публичный Метод

public GetSuccessorId ( int index ) : NodeId
index int
Результат TSystems.RELOAD.Utils.NodeId

GotUpdatesFrom() публичный Метод

public GotUpdatesFrom ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
Результат bool

IsAttached() публичный Метод

public IsAttached ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
Результат bool

IsWaitForJoinAnsw() публичный Метод

public IsWaitForJoinAnsw ( NodeId nodeid ) : bool
nodeid TSystems.RELOAD.Utils.NodeId
Результат bool

Leave() публичный Метод

public Leave ( NodeId nodeId ) : bool
nodeId TSystems.RELOAD.Utils.NodeId
Результат bool

NeighborsFromTotal() публичный Метод

public NeighborsFromTotal ( List total_update_list, bool fSuccessors ) : List
total_update_list List
fSuccessors bool
Результат List

NodeWeNeed() публичный Метод

public NodeWeNeed ( NodeId nodeId ) : bool
nodeId TSystems.RELOAD.Utils.NodeId
Результат bool

PrintNeigborState() публичный Метод

public PrintNeigborState ( ) : void
Результат void

Reset() публичный Метод

public Reset ( ) : void
Результат void

RoutingTable() публичный Метод

public RoutingTable ( Node local_node, Machine machine ) : System
local_node Node
machine Machine
Результат System

SendUpdateToAllNeighbors() публичный Метод

Sends and update to all members of the successor and predecessor table
public SendUpdateToAllNeighbors ( ) : void
Результат void

SetFingerState() публичный Метод

public SetFingerState ( NodeId finger, NodeState state ) : void
finger TSystems.RELOAD.Utils.NodeId
state NodeState
Результат void

isFinger() публичный Метод

Returns true, if the tested Finger is needed for fingertable
public isFinger ( NodeId testFinger ) : bool
testFinger TSystems.RELOAD.Utils.NodeId
Результат bool

isFinger() публичный Метод

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.
Результат bool

isNewNeighbour() публичный Метод

public isNewNeighbour ( NodeId attacher ) : bool
attacher TSystems.RELOAD.Utils.NodeId
Результат bool

removeDuplicates() публичный Метод

Removes duplicates in any list of node id's
public removeDuplicates ( List inputList ) : List
inputList List A list containing node id's
Результат List

rmDuplicateFingers() публичный Метод

public rmDuplicateFingers ( List fingers ) : List
fingers List
Результат List