@Override public Object execute(CommandContext commandContext) { return commandContext.getMeterLogManager() .executeSelectSum(MetricsQueryImpl.this); } };
public Void execute(CommandContext commandContext) { if(timestamp == null && reporter == null) { commandContext.getMeterLogManager() .deleteAll(); } else { commandContext.getMeterLogManager() .deleteByTimestampAndReporter(timestamp, reporter); } return null; }
public Void execute(CommandContext commandContext) { for (MeterLogEntity meterLogEntity : logs) { commandContext.getMeterLogManager().insert(meterLogEntity); } return null; } });
@Override public Object execute(CommandContext commandContext) { return commandContext.getMeterLogManager() .executeSelectInterval(MetricsQueryImpl.this); } };
public Void execute(CommandContext commandContext) { if(timestamp == null && reporter == null) { commandContext.getMeterLogManager() .deleteAll(); } else { commandContext.getMeterLogManager() .deleteByTimestampAndReporter(timestamp, reporter); } return null; }
public Void execute(CommandContext commandContext) { for (MeterLogEntity meterLogEntity : logs) { commandContext.getMeterLogManager().insert(meterLogEntity); } return null; } });
@Override public Object execute(CommandContext commandContext) { return commandContext.getMeterLogManager() .executeSelectInterval(MetricsQueryImpl.this); } };
@Override public Object execute(CommandContext commandContext) { return commandContext.getMeterLogManager() .executeSelectSum(MetricsQueryImpl.this); } };
@Override public Void execute(CommandContext commandContext) { commandContext.getMeterLogManager().insert(new MeterLogEntity(name, reporterId, value, ClockUtil.getCurrentTime())); return null; } });
public Object execute(CommandContext commandContext) { commandContext.getMeterLogManager().deleteAll(); return null; } });
@Override public Void execute(CommandContext commandContext) { commandContext.getMeterLogManager().insert(new MeterLogEntity(name, reporterId, value, ClockUtil.getCurrentTime())); return null; } });
public Object execute(CommandContext commandContext) { commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = engineRule.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = managementService.createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } List<HistoricIncident> historicIncidents = historyService.createHistoricIncidentQuery().list(); for (HistoricIncident historicIncident : historicIncidents) { commandContext.getDbEntityManager().delete((HistoricIncidentEntity) historicIncident); } commandContext.getMeterLogManager().deleteAll(); return null; } });
@Override public Object execute(CommandContext commandContext) { return commandContext.getMeterLogManager() .executeSelectInterval(MetricsQueryImpl.this); } };
public Void execute(CommandContext commandContext) { List<Job> jobs = managementService.createJobQuery().list(); for (Job job : jobs) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); } List<HistoricIncident> historicIncidents = historyService.createHistoricIncidentQuery().list(); for (HistoricIncident historicIncident : historicIncidents) { commandContext.getDbEntityManager().delete((HistoricIncidentEntity) historicIncident); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = managementService.createJobQuery().list(); for (Job job : jobs) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); } List<HistoricIncident> historicIncidents = historyService.createHistoricIncidentQuery().list(); for (HistoricIncident historicIncident : historicIncidents) { commandContext.getDbEntityManager().delete((HistoricIncidentEntity) historicIncident); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = historyService.findHistoryCleanupJobs(); for (Job job: jobs) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); } //cleanup "detached" historic job logs final List<HistoricJobLog> list = historyService.createHistoricJobLogQuery().list(); for (HistoricJobLog jobLog: list) { commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobLog.getJobId()); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = historyService.findHistoryCleanupJobs(); for (Job job: jobs) { commandContext.getJobManager().deleteJob((JobEntity) job); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(job.getId()); } //cleanup "detached" historic job logs final List<HistoricJobLog> list = historyService.createHistoricJobLogQuery().list(); for (HistoricJobLog jobLog: list) { commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobLog.getJobId()); } List<HistoricIncident> historicIncidents = historyService.createHistoricIncidentQuery().list(); for (HistoricIncident historicIncident : historicIncidents) { commandContext.getDbEntityManager().delete((HistoricIncidentEntity) historicIncident); } commandContext.getMeterLogManager().deleteAll(); return null; } });
public Void execute(CommandContext commandContext) { List<Job> jobs = engineRule.getManagementService().createJobQuery().list(); if (jobs.size() > 0) { assertEquals(1, jobs.size()); String jobId = jobs.get(0).getId(); commandContext.getJobManager().deleteJob((JobEntity) jobs.get(0)); commandContext.getHistoricJobLogManager().deleteHistoricJobLogByJobId(jobId); } commandContext.getMeterLogManager().deleteAll(); return null; } });