public override void StartElectionProcess(string role) { _clusterContext.getLog(this.GetType()).info("Doing elections for role " + role); if (!_clusterContext.MyId.Equals(_clusterContext.LastElector)) { _clusterContext.LastElector = _clusterContext.MyId; } _elections[role] = new Election(new DefaultWinnerStrategy(_clusterContext)); }
private void LogElectionOutcome(ICollection <Vote> votes, IList <Vote> eligibleVotes) { string electionOutcome = string.Format("Election: received votes {0}, eligible votes {1}", votes, eligibleVotes); _electionContext.getLog(this.GetType()).debug(electionOutcome); }