/// <summary> /// Post processes the fact that <paramref name="sender" /> sent a <see cref="GenomeEvaluationFinished" /> /// message and was removed from <see cref="GenomeEvaluationDelegatorBase{TInstance, TResult}.AssignedEvaluations" />. /// </summary> /// <param name="sender">The sender of the <see cref="GenomeEvaluationFinished" /> message.</param> /// <param name="message">The <see cref="GenomeEvaluationFinished"/> message.</param> protected override void ReceivedGenomeEvaluationFinishedMessage( IActorRef sender, GenomeEvaluationFinished message) { Context.Unwatch(sender); base.ReceivedGenomeEvaluationFinishedMessage(sender, message); }
/// <summary> /// Post processes the fact that <paramref name="sender" /> sent a <see cref="GenomeEvaluationFinished" /> /// message and was removed from <see cref="GenomeEvaluationDelegatorBase{TInstance, TResult}.AssignedEvaluations" />. /// </summary> /// <param name="sender">The sender of the <see cref="GenomeEvaluationFinished" /> message.</param> /// <param name="message">The <see cref="GenomeEvaluationFinished"/> message.</param> protected override void ReceivedGenomeEvaluationFinishedMessage( IActorRef sender, GenomeEvaluationFinished message) { if (this.CurrentRunResults.ContainsKey(message.EvaluationId) && this.CurrentRunResults[message.EvaluationId].Count == message.ExpectedResultCount) { this._currentlyFinishedEvaluations.Add(message.EvaluationId); // If racing is enabled and a sufficient number of participants already was evaluated: if (this._configuration.EnableRacing && (this._currentlyFinishedEvaluations.Count >= this._numberOfWinners)) { // Determine & send newest timeout. var timeout = this.DetermineCurrentTimeout(); this.EvaluationActorRouter.Tell(new Broadcast(new UpdateTimeout(timeout))); } } base.ReceivedGenomeEvaluationFinishedMessage(sender, message); }
/// <summary> /// Initializes a new instance of the <see cref="GenomeEvaluationFinishedTest"/> class. /// </summary> public GenomeEvaluationFinishedTest() { this._finishedMessage = new GenomeEvaluationFinished(this._evaluationId, this._expectedResultCount); }
/// <summary> /// Post processes the fact that <paramref name="sender"/> sent a <see cref="GenomeEvaluationFinished"/> /// message and was removed from <see cref="AssignedEvaluations"/>. /// </summary> /// <param name="sender">The sender of the <see cref="GenomeEvaluationFinished"/> message.</param> /// <param name="message">The <see cref="GenomeEvaluationFinished"/> message.</param> protected virtual void ReceivedGenomeEvaluationFinishedMessage( IActorRef sender, GenomeEvaluationFinished message) { }