예제 #1
0
        // Token: 0x060001FF RID: 511 RVA: 0x0000A0EC File Offset: 0x000082EC
        private void InternalRefresh()
        {
            Dictionary <string, List <DownLevelServerStatusEntry> > dictionary = this.downLevelServerMapGetter();
            int             num             = 0;
            int             num2            = 0;
            ServiceTopology serviceTopology = null;

            try
            {
                serviceTopology = ServiceTopology.GetCurrentServiceTopology(DownLevelServerPingManager.DownLevelServerPingServiceTopologyTimeout.Value, "d:\\dbs\\sh\\e16df\\0212_214120_0\\cmd\\1g\\sources\\Dev\\Cafe\\src\\HttpProxy\\DownLevelServerManager\\DownLevelServerPingManager.cs", "InternalRefresh", 209);
            }
            catch (ReadTopologyTimeoutException)
            {
            }
            foreach (List <DownLevelServerStatusEntry> list in dictionary.Values)
            {
                foreach (DownLevelServerStatusEntry downLevelServerStatusEntry in list)
                {
                    if (serviceTopology != null && serviceTopology.IsServerOutOfService(downLevelServerStatusEntry.BackEndServer.Fqdn, "d:\\dbs\\sh\\e16df\\0212_214120_0\\cmd\\1g\\sources\\Dev\\Cafe\\src\\HttpProxy\\DownLevelServerManager\\DownLevelServerPingManager.cs", "InternalRefresh", 220))
                    {
                        if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(2))
                        {
                            ExTraceGlobals.VerboseTracer.TraceWarning <BackEndServer>((long)this.GetHashCode(), "[DownLevelServerPingManager::InternalRefresh]: Skipping server {0} because it's marked as OutOfService.", downLevelServerStatusEntry.BackEndServer);
                        }
                        downLevelServerStatusEntry.IsHealthy = false;
                    }
                    else
                    {
                        Uri uri = this.pingStrategy.Member.BuildUrl(downLevelServerStatusEntry.BackEndServer.Fqdn);
                        Diagnostics.Logger.LogEvent(FrontEndHttpProxyEventLogConstants.Tuple_PingingDownLevelServer, downLevelServerStatusEntry.BackEndServer.Fqdn, new object[]
                        {
                            HttpProxyGlobals.ProtocolType.ToString(),
                            downLevelServerStatusEntry.BackEndServer.Fqdn,
                            uri
                        });
                        Exception ex = this.pingStrategy.Member.Ping(uri);
                        if (ex != null)
                        {
                            ex = this.pingStrategy.Member.Ping(uri);
                        }
                        if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(1))
                        {
                            ExTraceGlobals.VerboseTracer.TraceDebug <Uri, Exception>((long)this.GetHashCode(), "[DownLevelServerPingManager::InternalRefresh]: Tested endpoint {0} with result {1}.", uri, ex);
                        }
                        if (ex != null)
                        {
                            downLevelServerStatusEntry.IsHealthy = false;
                            Diagnostics.Logger.LogEvent(FrontEndHttpProxyEventLogConstants.Tuple_MarkingDownLevelServerUnhealthy, downLevelServerStatusEntry.BackEndServer.Fqdn, new object[]
                            {
                                HttpProxyGlobals.ProtocolType.ToString(),
                                downLevelServerStatusEntry.BackEndServer.Fqdn,
                                uri,
                                ex.ToString()
                            });
                        }
                        else
                        {
                            num2++;
                            downLevelServerStatusEntry.IsHealthy = true;
                        }
                    }
                    num++;
                }
            }
            PerfCounters.HttpProxyCountersInstance.DownLevelTotalServers.RawValue   = (long)num;
            PerfCounters.HttpProxyCountersInstance.DownLevelHealthyServers.RawValue = (long)num2;
        }