public DefaultClusterContext(IIdentityLookup identityLookup, PidCache pidCache, ClusterContextConfig config, CancellationToken killSwitch) { _identityLookup = identityLookup; _pidCache = pidCache; _requestLogThrottle = Throttle.Create( config.MaxNumberOfEventsInRequestLogThrottlePeriod, config.RequestLogThrottlePeriod, i => Logger.LogInformation("Throttled {LogCount} TryRequestAsync logs", i) ); _clock = new TaskClock(config.ActorRequestTimeout, TimeSpan.FromSeconds(1), killSwitch); _clock.Start(); }
public ExperimentalClusterContext(Cluster cluster) { _identityLookup = cluster.IdentityLookup; _pidCache = cluster.PidCache; var config = cluster.Config; _requestLogThrottle = Throttle.Create( config.MaxNumberOfEventsInRequestLogThrottlePeriod, config.RequestLogThrottlePeriod, i => Logger.LogInformation("Throttled {LogCount} TryRequestAsync logs", i) ); _clock = new TaskClock(config.ActorRequestTimeout, TimeSpan.FromSeconds(1), cluster.System.Shutdown); _clock.Start(); }