private void InactivateProcedureStart() => startProcess(INACTIVATE_PROCEDURE, ProcessType.InactivateProcedure, () => { if (ActiveProcedures.Any()) { IProcedure randomProcedure = ActiveProcedures.GetRandomProcedure(); if (randomProcedure != null) { InactivateProcedure(randomProcedure); } } });
private void ExecuteRequestStart() => startProcess(REQUEST, ProcessType.ExecuteRequest, () => { if (ActiveProcedures.Any()) { IProcedure procedure = ActiveProcedures.GetRandomProcedure(); if (procedure != null) { _log.processoFezUmaRequisicao(procedure.Identifier); bool recieved = procedure.SendRequest(); if (!recieved) { _log.naoFoiObtidaNenhumaRespostaParaARequisicao(); procedure.BeginElection(); } } } });