Exemplo n.º 1
0
 private void InactivateManagerStart() =>
 startProcess(INACTIVATE_MANAGER, ProcessType.InactivateManager, () =>
 {
     if (ActiveProcedures.Any())
     {
         IProcedure managerProcedure = ActiveProcedures.RetrieveManager();
         if (managerProcedure != null)
         {
             InactivateProcedure(managerProcedure);
         }
     }
 });
Exemplo n.º 2
0
 private void InactivateProcedureStart() =>
 startProcess(INACTIVATE_PROCEDURE, ProcessType.InactivateProcedure, () =>
 {
     if (ActiveProcedures.Any())
     {
         IProcedure randomProcedure = ActiveProcedures.GetRandomProcedure();
         if (randomProcedure != null)
         {
             InactivateProcedure(randomProcedure);
         }
     }
 });
Exemplo n.º 3
0
        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();
                    }
                }
            }
        });