当前位置: 首页>>代码示例>>C#>>正文


C# Config.GetDouble方法代码示例

本文整理汇总了C#中Akka.Configuration.Config.GetDouble方法的典型用法代码示例。如果您正苦于以下问题:C# Config.GetDouble方法的具体用法?C# Config.GetDouble怎么用?C# Config.GetDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Akka.Configuration.Config的用法示例。


在下文中一共展示了Config.GetDouble方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestKitSettings

 public TestKitSettings(Config config)
 {
     _defaultTimeout = config.GetMillisDuration("akka.test.default-timeout", allowInfinite:false);
     _singleExpectDefault = config.GetMillisDuration("akka.test.single-expect-default", allowInfinite: false);
     _testEventFilterLeeway = config.GetMillisDuration("akka.test.filter-leeway", allowInfinite: false);
     _timefactor = config.GetDouble("akka.test.timefactor");
     if(_timefactor <= 0)
         throw new Exception(@"Expected a positive value for ""akka.test.timefactor"" but found "+_timefactor);
 }
开发者ID:ClusterReply,项目名称:akka.net,代码行数:9,代码来源:TestKitSettings.cs

示例2: PhiAccrualFailureDetector

 /// <summary>
 /// Constructor that reads parameters from config.
 /// Expecting config properties named 'threshold', 'max-sample-size',
 /// 'min-std-deviation', 'acceptable-heartbeat-pause', and 'heartbeat-interval'.
 /// </summary>
 public PhiAccrualFailureDetector(Config config, EventStream ev)
     : this(DefaultClock)
 {
     _threshold = config.GetDouble("threshold");
     _maxSampleSize = config.GetInt("max-sample-size");
     _minStdDeviation = config.GetTimeSpan("min-std-deviation");
     _acceptableHeartbeatPause = config.GetTimeSpan("acceptable-heartbeat-pause");
     _firstHeartbeatEstimate = config.GetTimeSpan("heartbeat-interval");
     state = new State(FirstHeartBeat, null);
 }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:15,代码来源:PhiAccrualFailureDetector.cs

示例3: ComputeWps

 private int ComputeWps(Config config)
 {
     return ThreadPoolConfig.ScaledPoolSize(config.GetInt("pool-size-min"), config.GetDouble("pool-size-factor"),
         config.GetInt("pool-size-max"));
 }
开发者ID:njimenez,项目名称:akka.net,代码行数:5,代码来源:HeliosTransport.cs

示例4: ChaosDestination

            public ChaosDestination(ActorRef probe)
            {
                Probe = probe;
                State = new List<int>();
                _config = Context.System.Settings.Config.GetConfig("akka.persistence.destination.chaos");
                _confirmFailureRate = _config.GetDouble("confirm-failure-rate");

                Receive<Msg>(m =>
                {
                    if (ChaosSupportExtensions.ShouldFail(_confirmFailureRate))
                    {
                        Log.Error(string.Format("[destination] confirm message failed (message = {0}, {1})", m.DeliveryId, m.I));
                    }
                    else if (State.Contains(m.I))
                    {
                        Log.Debug(string.Format("[destination] ignored duplicate (message = {0}, {1})", m.DeliveryId, m.I));
                        Sender.Tell(new Confirm(m.DeliveryId, m.I));
                    }
                    else
                    {
                        this.Add(m.I);
                        Sender.Tell(new Confirm(m.DeliveryId, m.I));
                        Log.Debug(string.Format("[destination] received and confirmed (message = {0}, {1})", m.DeliveryId, m.I));
                    }
                });
            }
开发者ID:rodrigovidal,项目名称:akka.net,代码行数:26,代码来源:GuaranteedDeliveryFailureSpec.cs

示例5: ChaosSender

            public ChaosSender(ActorRef destination, ActorRef probe)
            {
                _destination = destination;
                Probe = probe;
                State = new List<int>();
                _persistenceId = "chaosSender";

                _config = Context.System.Settings.Config.GetConfig("akka.persistence.sender.chaos");
                _liveProcessingFailureRate = _config.GetDouble("live-processing-failure-rate");
                _replayProcessingFailureRate = _config.GetDouble("replay-processing-failure-rate");
            }
开发者ID:rodrigovidal,项目名称:akka.net,代码行数:11,代码来源:GuaranteedDeliveryFailureSpec.cs

示例6: DefaultResizer

        /// <summary>
        /// Creates a new DefaultResizer from the given configuration
        /// </summary>
        /// <param name="resizerConfig"></param>
        private DefaultResizer(Config resizerConfig)
        {
            LowerBound = resizerConfig.GetInt("lower-bound");
            UpperBound = resizerConfig.GetInt("upper-bound");
            _pressureThreshold = resizerConfig.GetInt("pressure-threshold");
            _rampupRate = resizerConfig.GetDouble("rampup-rate");
            _backoffThreshold = resizerConfig.GetDouble("backoff-threshold");
            _backoffRate = resizerConfig.GetDouble("backoff-rate");
            _messagesPerResize = resizerConfig.GetInt("messages-per-resize");

            Validate();
        }
开发者ID:rmiller1971,项目名称:akka.net,代码行数:16,代码来源:Resizer.cs


注:本文中的Akka.Configuration.Config.GetDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。