public void CheckPredecessor() { if (Node.Predecessor == null) { _timeOutScheduler.StopTimer(OriginPredecessor); return; } _timeOutScheduler.StartTimer(OriginPredecessor); Log.Debug("Im called CheckPredecessor"); _dhtActions.CheckPredecessor(Node.Predecessor, Node.Id, Node); }
private void StabilizeResponseHandler(object?sender, System.EventArgs e) { // Log.Debug("Stabilize response handler " + Node); StabilizeResponseEventArgs eventArgs = (StabilizeResponseEventArgs)e; var predecessorOfSuccessor = eventArgs.PredecessorOfSuccessor; _timeOutScheduler.StopTimer(OriginSuccessor); if (predecessorOfSuccessor.Id != Node.Id) { // Log.Debug("predecessorOfSuccessor = " + predecessorOfSuccessor); Node.Successor = predecessorOfSuccessor; _dhtActions.Notify(Node.Successor, Node.Id, Node); } else { if (Node.Successor != null && Node.Predecessor != null) { StabilizeReplicaData(); RemoveDataFromExpiredReplicas(); } } }