Example #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);
 }
Example #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);
 }
Example #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();
 }
Example #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();
 }
Example #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. ");
 }
Example #6
0
 @ManagedAttribute(description = "Purge job status for current application")
 public boolean isPurgeScheduled() {
   return flowManager.getApplicationConfig(application).isFlowPurgeScheduled();
 }
Example #7
0
 @ManagedAttribute(description = "Cron expression for purge schedule")
 public String getPurgeSchedule() {
   return flowManager.getApplicationConfig(application).getFlowPurgeSchedule();
 }
Example #8
0
 @ManagedOperation(description = "Unschedules a purge job for current application and schedule")
 public void unschedule() {
   unscheduleJob(flowManager.getApplicationConfig(application));
 }
Example #9
0
 @ManagedOperation(description = "Executes a purge job once for current application")
 public void execute() {
   executeJob(flowManager.getApplicationConfig(application));
 }
Example #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);
 }