本文整理汇总了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);
}
示例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);
}
示例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"));
}
示例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));
}
});
}
示例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");
}
示例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();
}