コード例 #1
0
 public LoadDatabasesForTotalStatisticsCommand(TotalStatisticsCollectNextSampleContext context, IDatabasesRepository databasesRepository,
                                               DAL.Contracts.ISettingPropertiesRepository settingPropertiesRepository)
 {
     this.context                     = context;
     this.databasesRepository         = databasesRepository;
     this.settingPropertiesRepository = settingPropertiesRepository;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
 public IChainableCommand PublishTotalDatabaseStatisticsCommand(TotalStatisticsCollectNextSampleContext context)
 {
     return(new PublishTotalDatabaseStatisticsCommand(context, statisticsAccumulator));
 }
コード例 #5
0
 public IChainableCommand LoadDatabasesForTotalStatisticsCommand(TotalStatisticsCollectNextSampleContext context)
 {
     return(new LoadDatabasesForTotalStatisticsCommand(context, dbmsRepositories.GetDatabasesRepository(), dalRepositories.GetSettingPropertiesRepository()));
 }
コード例 #6
0
 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;
 }
コード例 #8
0
 public PublishTotalDatabaseStatisticsCommand(TotalStatisticsCollectNextSampleContext context, IStatisticsProcessingDataAccumulator accumulator)
 {
     this.context     = context;
     this.accumulator = accumulator;
 }