Esempio n. 1
0
 @ManagedAttribute(
     description =
         "Purge flows older than given duration "
             + "(e.g. \"30d\" will purge flows older than 30 days)")
 public void setPurgeFlowsOlderThan(String purgeFlowsOlderThan) {
   ApplicationConfig applicationConfig = flowManager.getApplicationConfig(application);
   applicationConfig.setPurgeFlowsOlderThan(formatInput(purgeFlowsOlderThan));
   flowManager.mergeApplicationConfig(applicationConfig);
 }
Esempio n. 2
0
 @ManagedAttribute(
     description =
         "Set to true to exclude ERROR flows from being purged. "
             + "Set to false to purge CLEAN and ERROR flows")
 public void setDoNotPurgeErrorFlows(boolean doNotPurgeErrorFlows) {
   ApplicationConfig applicationConfig = flowManager.getApplicationConfig(application);
   applicationConfig.setDoNotPurgeErrorFlows(doNotPurgeErrorFlows);
   flowManager.mergeApplicationConfig(applicationConfig);
 }
Esempio n. 3
0
 @ManagedAttribute(
     description =
         "Set to true to exclude ERROR flows from being purged. "
             + "Set to false to purge CLEAN and ERROR flows")
 public boolean isDoNotPurgeErrorFlows() {
   return flowManager.getApplicationConfig(application).isDoNotPurgeErrorFlows();
 }
Esempio n. 4
0
 @ManagedAttribute(
     description =
         "Purge flows older than given duration "
             + "(e.g. \"30d\" will purge flows older than 30 days)")
 public String getPurgeFlowsOlderThan() {
   return flowManager.getApplicationConfig(application).getPurgeFlowsOlderThan();
 }
Esempio n. 5
0
 private void initJobs() {
   LOG.info("Initialize flow purge jobs ... ");
   for (ApplicationConfig config : flowManager.findApplicationConfigs()) {
     if (config.isFlowPurgeScheduled()) {
       scheduleJob(config);
     } else {
       LOG.info("Skip scheduling of job for application " + config.getApplication());
     }
   }
   LOG.info("Initialization done. ");
 }
Esempio n. 6
0
 @ManagedAttribute(description = "Purge job status for current application")
 public boolean isPurgeScheduled() {
   return flowManager.getApplicationConfig(application).isFlowPurgeScheduled();
 }
Esempio n. 7
0
 @ManagedAttribute(description = "Cron expression for purge schedule")
 public String getPurgeSchedule() {
   return flowManager.getApplicationConfig(application).getFlowPurgeSchedule();
 }
Esempio n. 8
0
 @ManagedOperation(description = "Unschedules a purge job for current application and schedule")
 public void unschedule() {
   unscheduleJob(flowManager.getApplicationConfig(application));
 }
Esempio n. 9
0
 @ManagedOperation(description = "Executes a purge job once for current application")
 public void execute() {
   executeJob(flowManager.getApplicationConfig(application));
 }
Esempio n. 10
0
 @ManagedAttribute(description = "Cron expression for purge schedule")
 public void setPurgeSchedule(String purgeSchedule) {
   ApplicationConfig applicationConfig = flowManager.getApplicationConfig(application);
   applicationConfig.setFlowPurgeSchedule(formatInput(purgeSchedule));
   flowManager.mergeApplicationConfig(applicationConfig);
 }