本文整理汇总了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");
}
示例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);
}
示例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);
}
示例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");
}
示例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();
}
示例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");
}
示例7: ScatterGatherFirstCompletedPool
public ScatterGatherFirstCompletedPool(Config config) : base(config)
{
_within = config.GetMillisDuration("within");
}
示例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");
}
示例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");
}
示例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")) { }