Beispiel #1
0
        // Token: 0x060005EF RID: 1519 RVA: 0x00023680 File Offset: 0x00021880
        public void UpdateEngineThrottleInfo()
        {
            List <string> list = new List <string>();

            list.Add("Total Weight");
            list.Add("Scale Factor");
            try
            {
                List <EngineProperty> list2 = new List <EngineProperty>();
                list2.Add(new EngineProperty("Total Job Weight", "Total Weight", this._throttlingStatusProvider.GetTotalJobWeight().ToString()));
                foreach (KeyValuePair <string, int> keyValuePair in this._throttlingStatusProvider.GetScaleFactors())
                {
                    list2.Add(new EngineProperty(keyValuePair.Key, "Scale Factor", keyValuePair.Value.ToString()));
                }
                try
                {
                    list2.Add(new EngineProperty("Scale Licenses", "Scale Licenses", this.GetStackablePollersCount().ToString()));
                    list.Add("Scale Licenses");
                }
                catch (Exception ex)
                {
                    MasterEngineInitiator.log.Error("Can't load stackable poller licenses", ex);
                }
                EngineDAL.UpdateEngineProperties(base.EngineID, list2, list.ToArray());
            }
            catch (Exception ex2)
            {
                if (base.ThrowExceptions)
                {
                    throw;
                }
                MasterEngineInitiator.log.Error(ex2);
            }
        }
        // Token: 0x060003A1 RID: 929 RVA: 0x00017E78 File Offset: 0x00016078
        internal static void CheckPollerLimit()
        {
            Dictionary <string, int> dictionary  = new Dictionary <string, int>();
            Dictionary <string, int> dictionary2 = new Dictionary <string, int>();

            try
            {
                DataTable engineProperty = EngineDAL.GetEngineProperty("Scale Factor");
                if (engineProperty != null)
                {
                    foreach (object obj in engineProperty.Rows)
                    {
                        DataRow dataRow = (DataRow)obj;
                        int     num;
                        if (int.TryParse(dataRow["PropertyValue"] as string, out num))
                        {
                            if (num >= Settings.PollerLimitreachedScaleFactor)
                            {
                                string key = dataRow["ServerName"] as string;
                                dictionary2[key] = num;
                            }
                            else if (num >= Settings.PollerLimitWarningScaleFactor)
                            {
                                string key2 = dataRow["ServerName"] as string;
                                dictionary[key2] = num;
                            }
                        }
                    }
                }
                if (dictionary.Count > 0 || dictionary2.Count > 0)
                {
                    PollerLimitNotificationItemDAL.Show(dictionary, dictionary2);
                }
                else
                {
                    PollerLimitNotificationItemDAL.Hide();
                }
            }
            catch (Exception ex)
            {
                PollerLimitHelper.log.Warn("Exception while checking poller limit value: ", ex);
            }
        }
Beispiel #3
0
        internal static void CheckPollerLimit()
        {
            Dictionary <string, int> warningEngines = new Dictionary <string, int>();
            Dictionary <string, int> reachedEngines = new Dictionary <string, int>();

            try
            {
                DataTable engineProperty = EngineDAL.GetEngineProperty("Scale Factor");
                if (engineProperty != null)
                {
                    foreach (DataRow row in (InternalDataCollectionBase)engineProperty.Rows)
                    {
                        int result;
                        if (int.TryParse(row["PropertyValue"] as string, out result))
                        {
                            if (result >= Settings.PollerLimitreachedScaleFactor)
                            {
                                string index = row["ServerName"] as string;
                                reachedEngines[index] = result;
                            }
                            else if (result >= Settings.PollerLimitWarningScaleFactor)
                            {
                                string index = row["ServerName"] as string;
                                warningEngines[index] = result;
                            }
                        }
                    }
                }
                if (warningEngines.Count > 0 || reachedEngines.Count > 0)
                {
                    PollerLimitNotificationItemDAL.Show(warningEngines, reachedEngines);
                }
                else
                {
                    PollerLimitNotificationItemDAL.Hide();
                }
            }
            catch (Exception ex)
            {
                PollerLimitHelper.log.Warn((object)"Exception while checking poller limit value: ", ex);
            }
        }
Beispiel #4
0
        public void UpdateInfo(bool updateJobEngineThrottleInfo)
        {
            if (this.get_EngineID() == 0)
            {
                throw new InvalidOperationException("Class wasn't initialized");
            }
            int engineId = this.get_EngineID();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Add("IP", (object)this.GetIPAddress());
            dictionary.Add("PollingCompletion", (object)this.GetPollingCompletion());
            int num = this.get_InterfacesSupported() ? 1 : 0;

            EngineDAL.UpdateEngineInfo(engineId, dictionary, true, num != 0);
            if (!updateJobEngineThrottleInfo)
            {
                return;
            }
            this.UpdateEngineThrottleInfo();
        }
Beispiel #5
0
 // Token: 0x060005EE RID: 1518 RVA: 0x00023618 File Offset: 0x00021818
 public void UpdateInfo(bool updateJobEngineThrottleInfo)
 {
     if (base.EngineID == 0)
     {
         throw new InvalidOperationException("Class wasn't initialized");
     }
     EngineDAL.UpdateEngineInfo(base.EngineID, new Dictionary <string, object>
     {
         {
             "IP",
             base.GetIPAddress()
         },
         {
             "PollingCompletion",
             this.GetPollingCompletion()
         }
     }, true, base.InterfacesSupported);
     if (updateJobEngineThrottleInfo)
     {
         this.UpdateEngineThrottleInfo();
     }
 }
Beispiel #6
0
        public void UpdateEngineThrottleInfo()
        {
            List <string> stringList = new List <string>();

            stringList.Add("Total Weight");
            stringList.Add("Scale Factor");
            try
            {
                List <EngineProperty> enginePropertyList = new List <EngineProperty>();
                int totalJobWeight = this._throttlingStatusProvider.GetTotalJobWeight();
                enginePropertyList.Add(new EngineProperty("Total Job Weight", "Total Weight", totalJobWeight.ToString()));
                foreach (KeyValuePair <string, int> scaleFactor in this._throttlingStatusProvider.GetScaleFactors())
                {
                    enginePropertyList.Add(new EngineProperty(scaleFactor.Key, "Scale Factor", scaleFactor.Value.ToString()));
                }
                try
                {
                    enginePropertyList.Add(new EngineProperty("Scale Licenses", "Scale Licenses", this.GetStackablePollersCount().ToString()));
                    stringList.Add("Scale Licenses");
                }
                catch (Exception ex)
                {
                    MasterEngineInitiator.log.Error((object)"Can't load stackable poller licenses", ex);
                }
                EngineDAL.UpdateEngineProperties(this.get_EngineID(), (IEnumerable <EngineProperty>)enginePropertyList, stringList.ToArray());
            }
            catch (Exception ex)
            {
                if (this.get_ThrowExceptions())
                {
                    throw;
                }
                else
                {
                    MasterEngineInitiator.log.Error((object)ex);
                }
            }
        }