@Test public void assertStartupWhenRdbIsNotConfigured() { ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null); statisticManager.startup(); }
public void startup() { if (null != rdbRepository) { scheduler.start(); scheduler.register(new TaskResultStatisticJob(StatisticInterval.MINUTE, statisticData.get(StatisticInterval.MINUTE), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.HOUR, statisticData.get(StatisticInterval.HOUR), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.DAY, statisticData.get(StatisticInterval.DAY), rdbRepository)); scheduler.register(new JobRunningStatisticJob(registryCenter, rdbRepository)); scheduler.register(new RegisteredJobStatisticJob(configurationService, rdbRepository)); } }
StatisticManager { public void startup() { if (null != rdbRepository) { scheduler.start(); scheduler.register(new TaskResultStatisticJob(StatisticInterval.MINUTE, statisticData.get(StatisticInterval.MINUTE), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.HOUR, statisticData.get(StatisticInterval.HOUR), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.DAY, statisticData.get(StatisticInterval.DAY), rdbRepository)); scheduler.register(new JobRunningStatisticJob(registryCenter, rdbRepository)); scheduler.register(new RegisteredJobStatisticJob(configurationService, rdbRepository)); } } }
StatisticManager { public void startup() { if (null != rdbRepository) { scheduler.start(); scheduler.register(new TaskResultStatisticJob(StatisticInterval.MINUTE, statisticData.get(StatisticInterval.MINUTE), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.HOUR, statisticData.get(StatisticInterval.HOUR), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.DAY, statisticData.get(StatisticInterval.DAY), rdbRepository)); scheduler.register(new JobRunningStatisticJob(registryCenter, rdbRepository)); scheduler.register(new RegisteredJobStatisticJob(configurationService, rdbRepository)); } } private  StatisticManager(final CoordinatorRegistryCenter registryCenter, final TracingConfiguration tracingConfiguration,
                             final StatisticsScheduler scheduler, final Map<StatisticInterval, TaskResultMetaData> statisticData); }
StatisticManager { public void startup() { if (null != rdbRepository) { scheduler.start(); scheduler.register(new TaskResultStatisticJob(StatisticInterval.MINUTE, statisticData.get(StatisticInterval.MINUTE), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.HOUR, statisticData.get(StatisticInterval.HOUR), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.DAY, statisticData.get(StatisticInterval.DAY), rdbRepository)); scheduler.register(new JobRunningStatisticJob(registryCenter, rdbRepository)); scheduler.register(new RegisteredJobStatisticJob(configurationService, rdbRepository)); } } private  StatisticManager(final CoordinatorRegistryCenter registryCenter, final TracingConfiguration tracingConfiguration,
                             final StatisticsScheduler scheduler, final Map<StatisticInterval, TaskResultMetaData> statisticData); static StatisticManager getInstance(final CoordinatorRegistryCenter regCenter, final TracingConfiguration tracingConfiguration); void startup(); void shutdown(); void taskRunSuccessfully(); void taskRunFailed(); TaskResultStatistics getTaskResultStatisticsWeekly(); TaskResultStatistics getTaskResultStatisticsSinceOnline(); TaskResultStatistics findLatestTaskResultStatistics(final StatisticInterval statisticInterval); List<TaskResultStatistics> findTaskResultStatisticsDaily(); JobExecutionTypeStatistics getJobExecutionTypeStatistics(); List<TaskRunningStatistics> findTaskRunningStatisticsWeekly(); List<JobRunningStatistics> findJobRunningStatisticsWeekly(); List<JobRegisterStatistics> findJobRegisterStatisticsSinceOnline(); }
StatisticManager { public void startup() { if (null != rdbRepository) { scheduler.start(); scheduler.register(new TaskResultStatisticJob(StatisticInterval.MINUTE, statisticData.get(StatisticInterval.MINUTE), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.HOUR, statisticData.get(StatisticInterval.HOUR), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.DAY, statisticData.get(StatisticInterval.DAY), rdbRepository)); scheduler.register(new JobRunningStatisticJob(registryCenter, rdbRepository)); scheduler.register(new RegisteredJobStatisticJob(configurationService, rdbRepository)); } } private  StatisticManager(final CoordinatorRegistryCenter registryCenter, final TracingConfiguration tracingConfiguration,
                             final StatisticsScheduler scheduler, final Map<StatisticInterval, TaskResultMetaData> statisticData); static StatisticManager getInstance(final CoordinatorRegistryCenter regCenter, final TracingConfiguration tracingConfiguration); void startup(); void shutdown(); void taskRunSuccessfully(); void taskRunFailed(); TaskResultStatistics getTaskResultStatisticsWeekly(); TaskResultStatistics getTaskResultStatisticsSinceOnline(); TaskResultStatistics findLatestTaskResultStatistics(final StatisticInterval statisticInterval); List<TaskResultStatistics> findTaskResultStatisticsDaily(); JobExecutionTypeStatistics getJobExecutionTypeStatistics(); List<TaskRunningStatistics> findTaskRunningStatisticsWeekly(); List<JobRunningStatistics> findJobRunningStatisticsWeekly(); List<JobRegisterStatistics> findJobRegisterStatisticsSinceOnline();  }