Esempio n. 1
0
        private void CheckAllocateNewInstance()
        {
            if (NotifiableSubServerRequirement != null)
            {
                lock (lckAllocate)
                {
                    try
                    {
                        SubServer subServer = NotifiableSubServerRequirement.StartNewInstance();
                        if (subServer == null)
                        {
                            return;
                        }

                        AddSubServerInternal(subServer, true);
                        Logger.WriteLog("A new server instance was requested to meet the next requests", ServerLogType.ALERT);
                        Thread.Sleep(1000);
                    }
                    catch (Exception ex)
                    {
                        Logger.WriteLog($"Failed to request a new sub-server instance for the implementation of 'NotifiableSubServerRequirement': {ex.Message}",
                                        ServerLogType.ERROR);
                    }
                }
            }
        }
Esempio n. 2
0
 private void CheckAllocateNewInstance()
 {
     if (NotifiableSubServerRequirement != null)
     {
         AddSubServerInternal(NotifiableSubServerRequirement.StartNewInstance(), true);
         LogController.WriteLog("A new server instance was requested to meet the next requests", ServerLogType.ALERT);
     }
 }