public DistributedHashtable(IDhtRelayServiceAdapter relayServiceAdapter, IFingerTable fingerTable, Node node, IOptions <DhtSettings> options, IGenerateKey generateKey) { _relayServiceAdapter = relayServiceAdapter; _fingerTable = fingerTable; _node = node; _options = options; _generateKey = generateKey; }
/// <summary> /// Initialize fingertable by calling FindSuccessor for the start value of fingertable entries. /// <param name="id"></param> /// <param name="connectionNode"></param> /// <param name="destinationNode"></param> /// <param name="relayServiceAdapter"></param> /// <returns>"void"</returns> public void FixFingers(uint id, NodeDto connectionNode, Node destinationNode, IDhtRelayServiceAdapter relayServiceAdapter) { FingerTableEntries[0].Successor = connectionNode; for (int i = 1; i < _numberOfFingerTableEntries; i++) { destinationNode.FindSuccessor(FingerTableEntries[i].Start, connectionNode, destinationNode); } }
public DhtActions(IDhtRelayServiceAdapter relayServiceAdapter) { _relayServiceAdapter = relayServiceAdapter; }