public ActivationCountPlacementDirector(DeploymentLoadPublisher deploymentLoadPublisher, IOptions <GrainPlacementOptions> options, ILogger <ActivationCountPlacementDirector> logger) { this.logger = logger; SelectSilo = SelectSiloPowerOfK; if (options.Value.ActivationCountPlacementChooseOutOf <= 0) { throw new ArgumentException( "GlobalConfig.ActivationCountBasedPlacementChooseOutOf is " + options.Value.ActivationCountPlacementChooseOutOf); } chooseHowMany = options.Value.ActivationCountPlacementChooseOutOf; deploymentLoadPublisher?.SubscribeToStatisticsChangeEvents(this); }
public ActivationCountPlacementDirector(DeploymentLoadPublisher deploymentLoadPublisher, GlobalConfiguration globalConfig) { logger = LogManager.GetLogger(this.GetType().Name); SelectSilo = SelectSiloPowerOfK; if (globalConfig.ActivationCountBasedPlacementChooseOutOf <= 0) { throw new ArgumentException( "GlobalConfig.ActivationCountBasedPlacementChooseOutOf is " + globalConfig.ActivationCountBasedPlacementChooseOutOf); } chooseHowMany = globalConfig.ActivationCountBasedPlacementChooseOutOf; deploymentLoadPublisher?.SubscribeToStatisticsChangeEvents(this); }
public ActivationCountPlacementDirector(DeploymentLoadPublisher deploymentLoadPublisher, GlobalConfiguration globalConfig, LoggerWrapper <ActivationCountPlacementDirector> logger) { this.logger = logger; SelectSilo = SelectSiloPowerOfK; if (globalConfig.ActivationCountBasedPlacementChooseOutOf <= 0) { throw new ArgumentException( "GlobalConfig.ActivationCountBasedPlacementChooseOutOf is " + globalConfig.ActivationCountBasedPlacementChooseOutOf); } chooseHowMany = globalConfig.ActivationCountBasedPlacementChooseOutOf; deploymentLoadPublisher?.SubscribeToStatisticsChangeEvents(this); }