示例#1
0
        /// <summary>Initializes a new instance of <see cref="ClientConfiguration"/>.</summary>
        public ClientConfiguration()
            : base(false)
        {
            creationTimestamp    = DateTime.UtcNow;
            SourceFile           = null;
            PreferedGatewayIndex = -1;
            Gateways             = new List <IPEndPoint>();
            GatewayProvider      = GatewayProviderType.None;
            PreferredFamily      = AddressFamily.InterNetwork;
            NetInterface         = null;
            Port                 = 0;
            DNSHostName          = Dns.GetHostName();
            DeploymentId         = "";
            DataConnectionString = "";
            // Assume the ado invariant is for sql server storage if not explicitly specified
            AdoInvariant = Constants.INVARIANT_NAME_SQL_SERVER;

            TraceFilePattern    = "{0}-{1}.log";
            PropagateActivityId = Constants.DEFAULT_PROPAGATE_E2E_ACTIVITY_ID;

            GatewayListRefreshPeriod            = DEFAULT_GATEWAY_LIST_REFRESH_PERIOD;
            StatisticsProviderName              = null;
            StatisticsMetricsTableWriteInterval = DEFAULT_STATS_METRICS_TABLE_WRITE_PERIOD;
            StatisticsPerfCountersWriteInterval = DEFAULT_STATS_PERF_COUNTERS_WRITE_PERIOD;
            StatisticsLogWriteInterval          = DEFAULT_STATS_LOG_WRITE_PERIOD;
            StatisticsWriteLogStatisticsToTable = true;
            StatisticsCollectionLevel           = NodeConfiguration.DEFAULT_STATS_COLLECTION_LEVEL;
            LimitManager           = new LimitManager();
            ProviderConfigurations = new Dictionary <string, ProviderCategoryConfiguration>();
        }
示例#2
0
        /// <summary>
        /// </summary>
        public ClientConfiguration()
            : base(false)
        {
            creationTimestamp    = DateTime.UtcNow;
            SourceFile           = null;
            PreferedGatewayIndex = -1;
            Gateways             = new List <IPEndPoint>();
            GatewayProvider      = GatewayProviderType.None;
            PreferredFamily      = AddressFamily.InterNetwork;
            NetInterface         = null;
            Port                 = 0;
            DNSHostName          = Dns.GetHostName();
            DeploymentId         = Environment.UserName;
            DataConnectionString = "";

            DefaultTraceLevel            = Logger.Severity.Info;
            TraceLevelOverrides          = new List <Tuple <string, Logger.Severity> >();
            TraceToConsole               = true;
            TraceFilePattern             = "{0}-{1}.log";
            WriteMessagingTraces         = false;
            LargeMessageWarningThreshold = Constants.LARGE_OBJECT_HEAP_THRESHOLD;
            PropagateActivityId          = Constants.DEFAULT_PROPAGATE_E2E_ACTIVITY_ID;
            BulkMessageLimit             = Constants.DEFAULT_LOGGER_BULK_MESSAGE_LIMIT;

            GatewayListRefreshPeriod            = DEFAULT_GATEWAY_LIST_REFRESH_PERIOD;
            StatisticsProviderName              = null;
            StatisticsMetricsTableWriteInterval = DEFAULT_STATS_METRICS_TABLE_WRITE_PERIOD;
            StatisticsPerfCountersWriteInterval = DEFAULT_STATS_PERF_COUNTERS_WRITE_PERIOD;
            StatisticsLogWriteInterval          = DEFAULT_STATS_LOG_WRITE_PERIOD;
            StatisticsWriteLogStatisticsToTable = true;
            StatisticsCollectionLevel           = NodeConfiguration.DEFAULT_STATS_COLLECTION_LEVEL;
            LimitManager           = new LimitManager();
            ProviderConfigurations = new Dictionary <string, ProviderCategoryConfiguration>();
        }
示例#3
0
        internal static void ParseLimitValues(LimitManager limitManager, XmlElement root, string nodeName)
        {
            foreach (XmlNode node in root.ChildNodes)
            {
                var grandchild = node as XmlElement;
                if (grandchild == null)
                {
                    continue;
                }

                if (grandchild.LocalName.Equals("Limit") && grandchild.HasAttribute("Name") &&
                    (grandchild.HasAttribute("SoftLimit") || grandchild.HasAttribute("HardLimit")))
                {
                    var limitName = grandchild.GetAttribute("Name");
                    limitManager.AddLimitValue(limitName, new LimitValue
                    {
                        Name = limitName,
                        SoftLimitThreshold = ParseInt(grandchild.GetAttribute("SoftLimit"),
                                                      "Invalid integer value for the SoftLimit attribute on the Limit element"),
                        HardLimitThreshold = grandchild.HasAttribute("HardLimit") ? ParseInt(grandchild.GetAttribute("HardLimit"),
                                                                                             "Invalid integer value for the HardLimit attribute on the Limit element") : 0,
                    });
                }
            }
        }
示例#4
0
        public NodeConfiguration(NodeConfiguration other)
        {
            creationTimestamp = other.creationTimestamp;

            SiloName            = other.SiloName;
            HostNameOrIPAddress = other.HostNameOrIPAddress;
            DNSHostName         = other.DNSHostName;
            Port                 = other.Port;
            Generation           = other.Generation;
            AddressType          = other.AddressType;
            ProxyGatewayEndpoint = other.ProxyGatewayEndpoint;

            MaxActiveThreads            = other.MaxActiveThreads;
            DelayWarningThreshold       = other.DelayWarningThreshold;
            ActivationSchedulingQuantum = other.ActivationSchedulingQuantum;
            TurnWarningLengthThreshold  = other.TurnWarningLengthThreshold;
            EnableWorkerThreadInjection = other.EnableWorkerThreadInjection;

            LoadSheddingEnabled = other.LoadSheddingEnabled;
            LoadSheddingLimit   = other.LoadSheddingLimit;

            DefaultTraceLevel            = other.DefaultTraceLevel;
            TraceLevelOverrides          = new List <Tuple <string, Severity> >(other.TraceLevelOverrides);
            TraceToConsole               = other.TraceToConsole;
            TraceFilePattern             = other.TraceFilePattern;
            TraceFileName                = other.TraceFileName;
            LargeMessageWarningThreshold = other.LargeMessageWarningThreshold;
            PropagateActivityId          = other.PropagateActivityId;
            BulkMessageLimit             = other.BulkMessageLimit;

            StatisticsProviderName = other.StatisticsProviderName;
            StatisticsMetricsTableWriteInterval = other.StatisticsMetricsTableWriteInterval;
            StatisticsPerfCountersWriteInterval = other.StatisticsPerfCountersWriteInterval;
            StatisticsLogWriteInterval          = other.StatisticsLogWriteInterval;
            StatisticsWriteLogStatisticsToTable = other.StatisticsWriteLogStatisticsToTable;
            StatisticsCollectionLevel           = other.StatisticsCollectionLevel;

            LimitManager = new LimitManager(other.LimitManager); // Shallow copy

            Subnet = other.Subnet;

            MinDotNetThreadPoolSize = other.MinDotNetThreadPoolSize;
            Expect100Continue       = other.Expect100Continue;
            DefaultConnectionLimit  = other.DefaultConnectionLimit;
            UseNagleAlgorithm       = other.UseNagleAlgorithm;

            StartupTypeName = other.StartupTypeName;
            AdditionalAssemblyDirectories = new Dictionary <string, SearchOption>(other.AdditionalAssemblyDirectories);
            ExcludedGrainTypes            = other.ExcludedGrainTypes.ToList();
            TelemetryConfiguration        = other.TelemetryConfiguration.Clone();
        }
示例#5
0
        public NodeConfiguration()
        {
            creationTimestamp = DateTime.UtcNow;

            SiloName            = "";
            HostNameOrIPAddress = "";
            DNSHostName         = Dns.GetHostName();
            Port                 = 0;
            Generation           = 0;
            AddressType          = AddressFamily.InterNetwork;
            ProxyGatewayEndpoint = null;

            MaxActiveThreads            = DEFAULT_MAX_ACTIVE_THREADS;
            DelayWarningThreshold       = TimeSpan.FromMilliseconds(10000); // 10,000 milliseconds
            ActivationSchedulingQuantum = DEFAULT_ACTIVATION_SCHEDULING_QUANTUM;
            TurnWarningLengthThreshold  = TimeSpan.FromMilliseconds(200);
            EnableWorkerThreadInjection = ENABLE_WORKER_THREAD_INJECTION;

            LoadSheddingEnabled = false;
            LoadSheddingLimit   = 95;

            DefaultTraceLevel            = Severity.Info;
            TraceLevelOverrides          = new List <Tuple <string, Severity> >();
            TraceToConsole               = ConsoleText.IsConsoleAvailable;
            TraceFilePattern             = "{0}-{1}.log";
            LargeMessageWarningThreshold = Constants.LARGE_OBJECT_HEAP_THRESHOLD;
            PropagateActivityId          = Constants.DEFAULT_PROPAGATE_E2E_ACTIVITY_ID;
            BulkMessageLimit             = Constants.DEFAULT_LOGGER_BULK_MESSAGE_LIMIT;

            StatisticsMetricsTableWriteInterval = DEFAULT_STATS_METRICS_TABLE_WRITE_PERIOD;
            StatisticsPerfCountersWriteInterval = DEFAULT_STATS_PERF_COUNTERS_WRITE_PERIOD;
            StatisticsLogWriteInterval          = DEFAULT_STATS_LOG_WRITE_PERIOD;
            StatisticsWriteLogStatisticsToTable = true;
            StatisticsCollectionLevel           = DEFAULT_STATS_COLLECTION_LEVEL;

            LimitManager = new LimitManager();

            MinDotNetThreadPoolSize = DEFAULT_MIN_DOT_NET_THREAD_POOL_SIZE;

            // .NET ServicePointManager settings / optimizations
            Expect100Continue      = false;
            DefaultConnectionLimit = DEFAULT_MIN_DOT_NET_CONNECTION_LIMIT;
            UseNagleAlgorithm      = false;

            AdditionalAssemblyDirectories = new Dictionary <string, SearchOption>();
            ExcludedGrainTypes            = new List <string>();
        }
示例#6
0
 public LimitManager(LimitManager other)
 {
     limitValues = new Dictionary<string, LimitValue>(other.limitValues);
 }
示例#7
0
        public NodeConfiguration(NodeConfiguration other)
        {
            creationTimestamp = other.creationTimestamp;

            SiloName = other.SiloName;
            HostNameOrIPAddress = other.HostNameOrIPAddress;
            DNSHostName = other.DNSHostName;
            Port = other.Port;
            Generation = other.Generation;
            AddressType = other.AddressType;
            ProxyGatewayEndpoint = other.ProxyGatewayEndpoint;

            MaxActiveThreads = other.MaxActiveThreads;
            DelayWarningThreshold = other.DelayWarningThreshold;
            ActivationSchedulingQuantum = other.ActivationSchedulingQuantum;
            TurnWarningLengthThreshold = other.TurnWarningLengthThreshold;
            InjectMoreWorkerThreads = other.InjectMoreWorkerThreads;

            LoadSheddingEnabled = other.LoadSheddingEnabled;
            LoadSheddingLimit = other.LoadSheddingLimit;

            DefaultTraceLevel = other.DefaultTraceLevel;
            TraceLevelOverrides = new List<Tuple<string, Severity>>(other.TraceLevelOverrides);
            TraceToConsole = other.TraceToConsole;
            TraceFilePattern = other.TraceFilePattern;
            TraceFileName = other.TraceFileName;
            LargeMessageWarningThreshold = other.LargeMessageWarningThreshold;
            PropagateActivityId = other.PropagateActivityId;
            BulkMessageLimit = other.BulkMessageLimit;

            StatisticsProviderName = other.StatisticsProviderName;
            StatisticsMetricsTableWriteInterval = other.StatisticsMetricsTableWriteInterval;
            StatisticsPerfCountersWriteInterval = other.StatisticsPerfCountersWriteInterval;
            StatisticsLogWriteInterval = other.StatisticsLogWriteInterval;
            StatisticsWriteLogStatisticsToTable = other.StatisticsWriteLogStatisticsToTable;
            StatisticsCollectionLevel = other.StatisticsCollectionLevel;

            LimitManager = new LimitManager(other.LimitManager); // Shallow copy

            Subnet = other.Subnet;

            MinDotNetThreadPoolSize = other.MinDotNetThreadPoolSize;
            Expect100Continue = other.Expect100Continue;
            DefaultConnectionLimit = other.DefaultConnectionLimit;
            UseNagleAlgorithm = other.UseNagleAlgorithm;

            StartupTypeName = other.StartupTypeName;
            AdditionalAssemblyDirectories = other.AdditionalAssemblyDirectories;
        }
示例#8
0
        public NodeConfiguration()
        {
            creationTimestamp = DateTime.UtcNow;

            SiloName = "";
            HostNameOrIPAddress = "";
            DNSHostName = Dns.GetHostName();
            Port = 0;
            Generation = 0;
            AddressType = AddressFamily.InterNetwork;
            ProxyGatewayEndpoint = null;

            MaxActiveThreads = DEFAULT_MAX_ACTIVE_THREADS;
            DelayWarningThreshold = TimeSpan.FromMilliseconds(10000); // 10,000 milliseconds
            ActivationSchedulingQuantum = DEFAULT_ACTIVATION_SCHEDULING_QUANTUM;
            TurnWarningLengthThreshold = TimeSpan.FromMilliseconds(200);
            InjectMoreWorkerThreads = INJECT_MORE_WORKER_THREADS;

            LoadSheddingEnabled = false;
            LoadSheddingLimit = 95;

            DefaultTraceLevel = Severity.Info;
            TraceLevelOverrides = new List<Tuple<string, Severity>>();
            TraceToConsole = true;
            TraceFilePattern = "{0}-{1}.log";
            LargeMessageWarningThreshold = Constants.LARGE_OBJECT_HEAP_THRESHOLD;
            PropagateActivityId = Constants.DEFAULT_PROPAGATE_E2E_ACTIVITY_ID;
            BulkMessageLimit = Constants.DEFAULT_LOGGER_BULK_MESSAGE_LIMIT;

            StatisticsMetricsTableWriteInterval = DEFAULT_STATS_METRICS_TABLE_WRITE_PERIOD;
            StatisticsPerfCountersWriteInterval = DEFAULT_STATS_PERF_COUNTERS_WRITE_PERIOD;
            StatisticsLogWriteInterval = DEFAULT_STATS_LOG_WRITE_PERIOD;
            StatisticsWriteLogStatisticsToTable = true;
            StatisticsCollectionLevel = DEFAULT_STATS_COLLECTION_LEVEL;

            LimitManager = new LimitManager();

            MinDotNetThreadPoolSize = DEFAULT_MIN_DOT_NET_THREAD_POOL_SIZE;

            // .NET ServicePointManager settings / optimizations
            Expect100Continue = false;
            DefaultConnectionLimit = DEFAULT_MIN_DOT_NET_CONNECTION_LIMIT;
            UseNagleAlgorithm = false;

            AdditionalAssemblyDirectories = new Dictionary<string, SearchOption>();
        }
示例#9
0
 public LimitManager(LimitManager other)
 {
     limitValues = new Dictionary <string, LimitValue>(other.limitValues);
 }