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