public LoadDatabasesForTotalStatisticsCommand(TotalStatisticsCollectNextSampleContext context, IDatabasesRepository databasesRepository, DAL.Contracts.ISettingPropertiesRepository settingPropertiesRepository) { this.context = context; this.databasesRepository = databasesRepository; this.settingPropertiesRepository = settingPropertiesRepository; }
public IExecutableCommand TotalStatisticsCollectNextSampleChain(TotalStatisticsCollectNextSampleContext context) { CommandChainCreator chain = new CommandChainCreator(); chain.Add(commands.LoadDatabasesForTotalStatisticsCommand(context)); chain.Add(commands.CollectTotalDatabaseStatisticsCommand(context)); chain.Add(commands.PublishTotalDatabaseStatisticsCommand(context)); return(chain.FirstCommand); }
private void Timer_Elapsed(object sender, ElapsedEventArgs e) { var context = new TotalStatisticsCollectNextSampleContext(); queue.Enqueue(chainFactory.TotalStatisticsCollectNextSampleChain(context)); DateTime now = DateTime.Now; if ((now - lastStatePersistenceDate).TotalSeconds >= PERSISTENCE_THRESHOLD_ELAPSED_SECONDS) { InitiatePersistence(); lastStatePersistenceDate = now; } }
public IChainableCommand PublishTotalDatabaseStatisticsCommand(TotalStatisticsCollectNextSampleContext context) { return(new PublishTotalDatabaseStatisticsCommand(context, statisticsAccumulator)); }
public IChainableCommand LoadDatabasesForTotalStatisticsCommand(TotalStatisticsCollectNextSampleContext context) { return(new LoadDatabasesForTotalStatisticsCommand(context, dbmsRepositories.GetDatabasesRepository(), dalRepositories.GetSettingPropertiesRepository())); }
public IChainableCommand CollectTotalDatabaseStatisticsCommand(TotalStatisticsCollectNextSampleContext context) { return(new CollectTotalDatabaseStatisticsCommand(log, context, dbmsRepositories.GetTotalDatabaseStatisticsRepository())); }
public CollectTotalDatabaseStatisticsCommand(ILog log, TotalStatisticsCollectNextSampleContext context, ITotalDatabaseStatisticsRepository repository) { this.log = log; this.context = context; this.repository = repository; }
public PublishTotalDatabaseStatisticsCommand(TotalStatisticsCollectNextSampleContext context, IStatisticsProcessingDataAccumulator accumulator) { this.context = context; this.accumulator = accumulator; }