test_class.declarator: flowPurgerMBean
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      FlowPurgerMBean flowPurgerMBean;
test_class.type: FlowPurgerMBean
test_class.var_name: flowPurgerMBean
test_class.declarator: testTransactionManager
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private TestTransactionManager testTransactionManager;
test_class.type: TestTransactionManager
test_class.var_name: testTransactionManager
test_class.declarator: flowRepository
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private FlowRepositoryImpl flowRepository;
test_class.type: FlowRepositoryImpl
test_class.var_name: flowRepository
test_class.declarator: allFlows = new FlowFinderCriteria(new Date(0), null, "test")
test_class.modifier: private
test_class.original_string: private FlowFinderCriteria allFlows = new FlowFinderCriteria(new Date(0), null, "test");
test_class.type: FlowFinderCriteria
test_class.var_name: allFlows
test_class.declarator: PURGE_SCHEDULE_EXPRESSION = "0/2 * * * * ?"
test_class.modifier: private static final
test_class.original_string: private static final String PURGE_SCHEDULE_EXPRESSION = "0/2 * * * * ?";
test_class.type: String
test_class.var_name: PURGE_SCHEDULE_EXPRESSION
test_class.declarator: EIGHT_DAYS = TimeUnit.DAYS.toMillis(8)
test_class.modifier: private static final
test_class.original_string: private static final long EIGHT_DAYS = TimeUnit.DAYS.toMillis(8);
test_class.type: long
test_class.var_name: EIGHT_DAYS
test_class.declarator: WAIT_TIMEOUT = 5
test_class.modifier: private static final
test_class.original_string: private static final long WAIT_TIMEOUT = 5;
test_class.type: long
test_class.var_name: WAIT_TIMEOUT
test_class.declarator: latch = new CountDownLatch(1)
test_class.modifier: private
test_class.original_string: private CountDownLatch latch = new CountDownLatch(1);
test_class.type: CountDownLatch
test_class.var_name: latch
test_class.file: commons/flow/src/test/java/org/openehealth/ipf/commons/flow/jmx/FlowPurgerMBeanTest.java
test_class.identifier: FlowPurgerMBeanTest
test_case.body: @Test
      public void testExecute() throws Exception {
          persistFlowHistory();
          assertEquals(6, flowRepository.findFlows(allFlows).size());
          flowPurgerMBean.getScheduler().getListenerManager().addJobListener(new PurgeJobListener(latch));
          flowPurgerMBean.setDoNotPurgeErrorFlows(false);
          flowPurgerMBean.setPurgeFlowsOlderThan("9d");
          flowPurgerMBean.execute();
          latch.await(WAIT_TIMEOUT, TimeUnit.SECONDS);        
          assertEquals(1, flowRepository.findFlows(allFlows).size());
          flowPurgerMBean.unschedule();
      }
test_case.class_method_signature: FlowPurgerMBeanTest.testExecute()
test_case.full_signature: @Test public void testExecute()
test_case.identifier: testExecute
test_case.invocations: persistFlowHistory assertEquals size findFlows addJobListener getListenerManager getScheduler setDoNotPurgeErrorFlows setPurgeFlowsOlderThan execute await assertEquals size findFlows unschedule
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExecute()
focal_class.declarator: LOG = LoggerFactory.getLogger(FlowPurgerMBean.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(FlowPurgerMBean.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: flowManager
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private FlowManager flowManager;
focal_class.type: FlowManager
focal_class.var_name: flowManager
focal_class.declarator: application
focal_class.modifier: private
focal_class.original_string: private String application;
focal_class.type: String
focal_class.var_name: application
focal_class.declarator: scheduler
focal_class.modifier: private
focal_class.original_string: private Scheduler scheduler;
focal_class.type: Scheduler
focal_class.var_name: scheduler
focal_class.declarator: flowPurgeJobs
focal_class.modifier: private final
focal_class.original_string: private final Map<String, FlowPurgeJob> flowPurgeJobs;
focal_class.type: Map<String, FlowPurgeJob>
focal_class.var_name: flowPurgeJobs
focal_class.file: commons/flow/src/main/java/org/openehealth/ipf/commons/flow/jmx/FlowPurgerMBean.java
focal_class.identifier: FlowPurgerMBean
focal_class.interfaces: implements InitializingBean, DisposableBean
focal_class.class_method_signature: FlowPurgerMBean.FlowPurgerMBean()
focal_class.full_signature: public  FlowPurgerMBean()
focal_class.identifier: FlowPurgerMBean
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  FlowPurgerMBean()
focal_class.class_method_signature: FlowPurgerMBean.getApplication()
focal_class.full_signature: @ManagedAttribute(description="Application name") public String getApplication()
focal_class.identifier: getApplication
focal_class.modifiers: @ManagedAttribute(description="Application name") public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getApplication()
focal_class.class_method_signature: FlowPurgerMBean.setApplication(String application)
focal_class.full_signature: @ManagedAttribute(description="Application name") public void setApplication(String application)
focal_class.identifier: setApplication
focal_class.modifiers: @ManagedAttribute(description="Application name") public
focal_class.parameters: (String application)
focal_class.return: void
focal_class.signature: void setApplication(String application)
focal_class.class_method_signature: FlowPurgerMBean.getPurgeFlowsOlderThan()
focal_class.full_signature: @ManagedAttribute(description="Purge flows older than given duration " + "(e.g. \"30d\" will purge flows older than 30 days)") public String getPurgeFlowsOlderThan()
focal_class.identifier: getPurgeFlowsOlderThan
focal_class.modifiers: @ManagedAttribute(description="Purge flows older than given duration " + "(e.g. \"30d\" will purge flows older than 30 days)") public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPurgeFlowsOlderThan()
focal_class.class_method_signature: FlowPurgerMBean.isDoNotPurgeErrorFlows()
focal_class.full_signature: @ManagedAttribute(description="Set to true to exclude ERROR flows from being purged. " + "Set to false to purge CLEAN and ERROR flows") public boolean isDoNotPurgeErrorFlows()
focal_class.identifier: isDoNotPurgeErrorFlows
focal_class.modifiers: @ManagedAttribute(description="Set to true to exclude ERROR flows from being purged. " + "Set to false to purge CLEAN and ERROR flows") public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isDoNotPurgeErrorFlows()
focal_class.class_method_signature: FlowPurgerMBean.getPurgeSchedule()
focal_class.full_signature: @ManagedAttribute(description="Cron expression for purge schedule") public String getPurgeSchedule()
focal_class.identifier: getPurgeSchedule
focal_class.modifiers: @ManagedAttribute(description="Cron expression for purge schedule") public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPurgeSchedule()
focal_class.class_method_signature: FlowPurgerMBean.isPurgeScheduled()
focal_class.full_signature: @ManagedAttribute(description="Purge job status for current application") public boolean isPurgeScheduled()
focal_class.identifier: isPurgeScheduled
focal_class.modifiers: @ManagedAttribute(description="Purge job status for current application") public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isPurgeScheduled()
focal_class.class_method_signature: FlowPurgerMBean.setPurgeFlowsOlderThan(String purgeFlowsOlderThan)
focal_class.full_signature: @ManagedAttribute(description="Purge flows older than given duration " + "(e.g. \"30d\" will purge flows older than 30 days)") public void setPurgeFlowsOlderThan(String purgeFlowsOlderThan)
focal_class.identifier: setPurgeFlowsOlderThan
focal_class.modifiers: @ManagedAttribute(description="Purge flows older than given duration " + "(e.g. \"30d\" will purge flows older than 30 days)") public
focal_class.parameters: (String purgeFlowsOlderThan)
focal_class.return: void
focal_class.signature: void setPurgeFlowsOlderThan(String purgeFlowsOlderThan)
focal_class.class_method_signature: FlowPurgerMBean.setDoNotPurgeErrorFlows(boolean doNotPurgeErrorFlows)
focal_class.full_signature: @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)
focal_class.identifier: setDoNotPurgeErrorFlows
focal_class.modifiers: @ManagedAttribute(description="Set to true to exclude ERROR flows from being purged. " + "Set to false to purge CLEAN and ERROR flows") public
focal_class.parameters: (boolean doNotPurgeErrorFlows)
focal_class.return: void
focal_class.signature: void setDoNotPurgeErrorFlows(boolean doNotPurgeErrorFlows)
focal_class.class_method_signature: FlowPurgerMBean.setPurgeSchedule(String purgeSchedule)
focal_class.full_signature: @ManagedAttribute(description="Cron expression for purge schedule") public void setPurgeSchedule(String purgeSchedule)
focal_class.identifier: setPurgeSchedule
focal_class.modifiers: @ManagedAttribute(description="Cron expression for purge schedule") public
focal_class.parameters: (String purgeSchedule)
focal_class.return: void
focal_class.signature: void setPurgeSchedule(String purgeSchedule)
focal_class.class_method_signature: FlowPurgerMBean.execute()
focal_class.full_signature: @ManagedOperation(description = "Executes a purge job once for current application") public void execute()
focal_class.identifier: execute
focal_class.modifiers: @ManagedOperation(description = "Executes a purge job once for current application") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: FlowPurgerMBean.schedule()
focal_class.full_signature: @ManagedOperation(description = "Schedules or reschedules a purge job for current application and schedule") public void schedule()
focal_class.identifier: schedule
focal_class.modifiers: @ManagedOperation(description = "Schedules or reschedules a purge job for current application and schedule") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void schedule()
focal_class.class_method_signature: FlowPurgerMBean.unschedule()
focal_class.full_signature: @ManagedOperation(description = "Unschedules a purge job for current application and schedule") public void unschedule()
focal_class.identifier: unschedule
focal_class.modifiers: @ManagedOperation(description = "Unschedules a purge job for current application and schedule") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void unschedule()
focal_class.class_method_signature: FlowPurgerMBean.afterPropertiesSet()
focal_class.full_signature: @Override public void afterPropertiesSet()
focal_class.identifier: afterPropertiesSet
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void afterPropertiesSet()
focal_class.class_method_signature: FlowPurgerMBean.destroy()
focal_class.full_signature: @Override public void destroy()
focal_class.identifier: destroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroy()
focal_class.class_method_signature: FlowPurgerMBean.executeJob(ApplicationConfig config)
focal_class.full_signature: private void executeJob(ApplicationConfig config)
focal_class.identifier: executeJob
focal_class.modifiers: private
focal_class.parameters: (ApplicationConfig config)
focal_class.return: void
focal_class.signature: void executeJob(ApplicationConfig config)
focal_class.class_method_signature: FlowPurgerMBean.scheduleJob(ApplicationConfig config)
focal_class.full_signature: private void scheduleJob(ApplicationConfig config)
focal_class.identifier: scheduleJob
focal_class.modifiers: private
focal_class.parameters: (ApplicationConfig config)
focal_class.return: void
focal_class.signature: void scheduleJob(ApplicationConfig config)
focal_class.class_method_signature: FlowPurgerMBean.unscheduleJob(ApplicationConfig config)
focal_class.full_signature: private void unscheduleJob(ApplicationConfig config)
focal_class.identifier: unscheduleJob
focal_class.modifiers: private
focal_class.parameters: (ApplicationConfig config)
focal_class.return: void
focal_class.signature: void unscheduleJob(ApplicationConfig config)
focal_class.class_method_signature: FlowPurgerMBean.initJobs()
focal_class.full_signature: private void initJobs()
focal_class.identifier: initJobs
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initJobs()
focal_class.class_method_signature: FlowPurgerMBean.formatInput(String input)
focal_class.full_signature: private static String formatInput(String input)
focal_class.identifier: formatInput
focal_class.modifiers: private static
focal_class.parameters: (String input)
focal_class.return: String
focal_class.signature: String formatInput(String input)
focal_class.class_method_signature: FlowPurgerMBean.getFlowPurgeJob(ApplicationConfig config)
focal_class.full_signature: private FlowPurgeJob getFlowPurgeJob(ApplicationConfig config)
focal_class.identifier: getFlowPurgeJob
focal_class.modifiers: private
focal_class.parameters: (ApplicationConfig config)
focal_class.return: FlowPurgeJob
focal_class.signature: FlowPurgeJob getFlowPurgeJob(ApplicationConfig config)
focal_class.class_method_signature: FlowPurgerMBean.getScheduler()
focal_class.full_signature: public Scheduler getScheduler()
focal_class.identifier: getScheduler
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Scheduler
focal_class.signature: Scheduler getScheduler()
focal_class.class_method_signature: FlowPurgerMBean.setScheduler(Scheduler scheduler)
focal_class.full_signature: public void setScheduler(Scheduler scheduler)
focal_class.identifier: setScheduler
focal_class.modifiers: public
focal_class.parameters: (Scheduler scheduler)
focal_class.return: void
focal_class.signature: void setScheduler(Scheduler scheduler)
focal_class.class_method_signature: FlowPurgerMBean.getSchedulerMetaData()
focal_class.full_signature: @ManagedAttribute(description="Schedulers metadata") public Map<String, String> getSchedulerMetaData()
focal_class.identifier: getSchedulerMetaData
focal_class.modifiers: @ManagedAttribute(description="Schedulers metadata") public
focal_class.parameters: ()
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getSchedulerMetaData()
focal_method.body: @ManagedOperation(description = "Executes a purge job once for current application")
      public void execute() {
          executeJob(flowManager.getApplicationConfig(application));
      }
focal_method.class_method_signature: FlowPurgerMBean.execute()
focal_method.full_signature: @ManagedOperation(description = "Executes a purge job once for current application") public void execute()
focal_method.identifier: execute
focal_method.invocations: executeJob getApplicationConfig
focal_method.modifiers: @ManagedOperation(description = "Executes a purge job once for current application") public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void execute()