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


C# Config.GetMillisDuration方法代码示例

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


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

示例1: RemoteSettings

 public RemoteSettings(Config config)
 {
     Config = config;
     LogReceive = config.GetBoolean("akka.remote.log-received-messages");
     LogSend = config.GetBoolean("akka.remote.log-sent-messages");
     UntrustedMode = config.GetBoolean("akka.remote.untrusted-mode");
     TrustedSelectionPaths = new HashSet<string>(config.GetStringList("akka.remote.trusted-selection-paths"));
     RemoteLifecycleEventsLogLevel = config.GetString("akka.remote.log-remote-lifecycle-events") ?? "DEBUG";
     if (RemoteLifecycleEventsLogLevel.Equals("on")) RemoteLifecycleEventsLogLevel = "DEBUG";
     FlushWait = config.GetMillisDuration("akka.remote.flush-wait-on-shutdown");
     ShutdownTimeout = config.GetMillisDuration("akka.remote.shutdown-timeout");
     TransportNames = config.GetStringList("akka.remote.enabled-transports");
     Transports = (from transportName in TransportNames
         let transportConfig = TransportConfigFor(transportName)
         select new TransportSettings(transportConfig)).ToArray();
     Adapters = ConfigToMap(config.GetConfig("akka.remote.adapters"));
     BackoffPeriod = config.GetMillisDuration("akka.remote.backoff-interval");
     RetryGateClosedFor = config.GetMillisDuration("akka.remote.retry-gate-closed-for", TimeSpan.Zero);
     UsePassiveConnections = config.GetBoolean("akka.remote.use-passive-connections");
     SysMsgBufferSize = config.GetInt("akka.remote.system-message-buffer-size");
     SysResendTimeout = config.GetMillisDuration("akka.remote.resend-interval");
     InitialSysMsgDeliveryTimeout = config.GetMillisDuration("akka.remote.initial-system-message-delivery-timeout");
     SysMsgAckTimeout = config.GetMillisDuration("akka.remote.system-message-ack-piggyback-timeout");
     QuarantineDuration = config.GetMillisDuration("akka.remote.prune-quarantine-marker-after");
     StartupTimeout = config.GetMillisDuration("akka.remote.startup-timeout");
     CommandAckTimeout = config.GetMillisDuration("akka.remote.command-ack-timeout");
 }
开发者ID:jweimann,项目名称:akka.net,代码行数:27,代码来源:RemoteSettings.cs

示例2: 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

示例3: 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.GetMillisDuration("min-std-deviation");
     _acceptableHeartbeatPause = config.GetMillisDuration("acceptable-heartbeat-pause");
     _firstHeartbeatEstimate = config.GetMillisDuration("heartbeat-interval");
     state = new State(FirstHeartBeat, null);
 }
开发者ID:ClusterReply,项目名称:akka.net,代码行数:15,代码来源:PhiAccrualFailureDetector.cs

示例4: RemoteSettings

        public RemoteSettings(Config config)
        {
            Config = config;
            LogReceive = config.GetBoolean("akka.remote.log-received-messages");
            LogSend = config.GetBoolean("akka.remote.log-sent-messages");

            var bufferSizeLogKey = "akka.remote.log-buffer-size-exceeding";
            if (config.GetString(bufferSizeLogKey).ToLowerInvariant().Equals("off") ||
                config.GetString(bufferSizeLogKey).ToLowerInvariant().Equals("false"))
            {
                LogBufferSizeExceeding = Int32.MaxValue;
            }
            else
            {
                LogBufferSizeExceeding = config.GetInt(bufferSizeLogKey);
            }

            UntrustedMode = config.GetBoolean("akka.remote.untrusted-mode");
            TrustedSelectionPaths = new HashSet<string>(config.GetStringList("akka.remote.trusted-selection-paths"));
            RemoteLifecycleEventsLogLevel = config.GetString("akka.remote.log-remote-lifecycle-events") ?? "DEBUG";
            Dispatcher = config.GetString("akka.remote.use-dispatcher");
            if (RemoteLifecycleEventsLogLevel.Equals("on")) RemoteLifecycleEventsLogLevel = "DEBUG";
            FlushWait = config.GetMillisDuration("akka.remote.flush-wait-on-shutdown");
            ShutdownTimeout = config.GetMillisDuration("akka.remote.shutdown-timeout");
            TransportNames = config.GetStringList("akka.remote.enabled-transports");
            Transports = (from transportName in TransportNames
                let transportConfig = TransportConfigFor(transportName)
                select new TransportSettings(transportConfig)).ToArray();
            Adapters = ConfigToMap(config.GetConfig("akka.remote.adapters"));
            BackoffPeriod = config.GetMillisDuration("akka.remote.backoff-interval");
            RetryGateClosedFor = config.GetMillisDuration("akka.remote.retry-gate-closed-for", TimeSpan.Zero);
            UsePassiveConnections = config.GetBoolean("akka.remote.use-passive-connections");
            SysMsgBufferSize = config.GetInt("akka.remote.system-message-buffer-size");
            SysResendTimeout = config.GetMillisDuration("akka.remote.resend-interval");
            InitialSysMsgDeliveryTimeout = config.GetMillisDuration("akka.remote.initial-system-message-delivery-timeout");
            SysMsgAckTimeout = config.GetMillisDuration("akka.remote.system-message-ack-piggyback-timeout");
            QuarantineDuration = config.GetMillisDuration("akka.remote.prune-quarantine-marker-after");
            StartupTimeout = config.GetMillisDuration("akka.remote.startup-timeout");
            CommandAckTimeout = config.GetMillisDuration("akka.remote.command-ack-timeout");

            WatchFailureDetectorConfig = config.GetConfig("akka.remote.watch-failure-detector");
            WatchFailureDetectorImplementationClass = WatchFailureDetectorConfig.GetString("implementation-class");
            WatchHeartBeatInterval = WatchFailureDetectorConfig.GetMillisDuration("heartbeat-interval");
            WatchUnreachableReaperInterval = WatchFailureDetectorConfig.GetMillisDuration("unreachable-nodes-reaper-interval");
            WatchHeartbeatExpectedResponseAfter = WatchFailureDetectorConfig.GetMillisDuration("expected-response-after");
        }
开发者ID:ClusterReply,项目名称:akka.net,代码行数:46,代码来源:RemoteSettings.cs

示例5: RemoteSettings

 public RemoteSettings(Config config)
 {
     Config = config;
     LogReceive = config.GetBoolean("akka.remote.log-received-messages");
     LogSend = config.GetBoolean("akka.remote.log-sent-messages");
     UntrustedMode = config.GetBoolean("akka.remote.untrusted-mode");
     TrustedSelectionPaths = new HashSet<string>(config.GetStringList("akka.remote.trusted-selection-paths"));
     RemoteLifecycleEventsLogLevel = config.GetString("akka.remote.log-remote-lifecycle-events");
     ShutdownTimeout = config.GetMillisDuration("akka.remote.shutdown-timeout");
     TransportNames = config.GetStringList("akka.remote.enabled-transports");
     Transports = (from transportName in TransportNames
         let transportConfig = TransportConfigFor(transportName)
         select new TransportSettings(transportConfig)).ToArray();
 }
开发者ID:Badmoonz,项目名称:akka.net,代码行数:14,代码来源:RemoteSettings.cs

示例6: ScatterGatherFirstCompletedGroup

 /// <summary>
 ///     Initializes a new instance of the <see cref="ScatterGatherFirstCompletedGroup" /> class.
 /// </summary>
 /// <param name="config">The configuration.</param>
 public ScatterGatherFirstCompletedGroup(Config config)
     : base(config.GetStringList("routees.paths"))
 {
     _within = config.GetMillisDuration("within");
 }
开发者ID:ClusterReply,项目名称:akka.net,代码行数:9,代码来源:ScatterGatherFirstCompleted.cs

示例7: ScatterGatherFirstCompletedPool

 public ScatterGatherFirstCompletedPool(Config config) : base(config)
 {
     _within = config.GetMillisDuration("within");
 }
开发者ID:ClusterReply,项目名称:akka.net,代码行数:4,代码来源:ScatterGatherFirstCompleted.cs

示例8: TailChoppingGroup

 /// <summary>
 /// Creates an instance of the TailChoppingGroup.
 /// </summary>
 /// <param name="config">The configuration to use with this instance.</param>
 public TailChoppingGroup(Config config)
 {
     Paths = config.GetStringList("routees.paths").ToArray();
     within = config.GetMillisDuration("within");
     interval = config.GetMillisDuration("tail-chopping-router.interval");
 }
开发者ID:ClusterReply,项目名称:akka.net,代码行数:10,代码来源:TailChoppingRoutingLogic.cs

示例9: TailChoppingPool

 /// <summary>
 /// Creates an instance of the TailChoppingPool.
 /// </summary>
 /// <param name="config">The configuration to use with this instance.</param>
 public TailChoppingPool(Config config)
 {
     NrOfInstances = config.GetInt("nr-of-instances");
     within = config.GetMillisDuration("within");
     interval = config.GetMillisDuration("tail-chopping-router.interval");
     Resizer = DefaultResizer.FromConfig(config);
     UsePoolDispatcher = config.HasPath("pool-dispatcher");
 }
开发者ID:ClusterReply,项目名称:akka.net,代码行数:12,代码来源:TailChoppingRoutingLogic.cs

示例10: DeadlineFailureDetector

 /// <summary>
 /// Constructor that reads parameters from an Akka <see cref="Config"/> section.
 /// Expects property 'acceptable-heartbeat-pause'.
 /// </summary>
 /// <param name="config"></param>
 /// <param name="ev"></param>
 public DeadlineFailureDetector(Config config, EventStream ev) : this(config.GetMillisDuration("acceptable-heartbeat-pause")) { }
开发者ID:ClusterReply,项目名称:akka.net,代码行数:7,代码来源:DeadlineFailureDetector.cs


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