Interface RuleEngineJobService
-
- All Known Implementing Classes:
DefaultRuleEngineJobService
public interface RuleEngineJobServiceThe interface to provide routine operations and checks to support the rule engine related jobs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountRunningJobs(java.lang.String ruleEngineJobCode)Checks how many currently active cron jobs a RuleEngineJob hasRuleEngineJobModelgetRuleEngineJob(java.lang.String jobCode, java.lang.String springBeanName)Retrieves (or creates one if absent) the RuleEngineJob, identified by given spring Bean namebooleanisRunning(java.lang.String ruleEngineJobCode)Checks whether the RuleEngineJob has any active cron jobsRuleEngineCronJobModeltriggerCronJob(java.lang.String ruleEngineJobCode, java.lang.String jobPerformableBeanName, java.util.function.Supplier<RuleEngineCronJobModel> cronJobSupplier)Given the rule engine Job, create a new instance ofRuleEngineCronJobModeland run it if no other associated cron job is currently in execution
-
-
-
Method Detail
-
getRuleEngineJob
RuleEngineJobModel getRuleEngineJob(java.lang.String jobCode, java.lang.String springBeanName)
Retrieves (or creates one if absent) the RuleEngineJob, identified by given spring Bean name- Parameters:
jobCode- job codespringBeanName- spring bean name- Returns:
- an instance of
RuleEngineJobModel
-
isRunning
boolean isRunning(java.lang.String ruleEngineJobCode)
Checks whether the RuleEngineJob has any active cron jobs- Parameters:
ruleEngineJobCode- code of the Job to check against- Returns:
- boolean indicating whether this job has any active cron jobs
-
countRunningJobs
int countRunningJobs(java.lang.String ruleEngineJobCode)
Checks how many currently active cron jobs a RuleEngineJob has- Parameters:
ruleEngineJobCode- code of the Job to check against- Returns:
- number of active cron jobs currently running
-
triggerCronJob
RuleEngineCronJobModel triggerCronJob(java.lang.String ruleEngineJobCode, java.lang.String jobPerformableBeanName, java.util.function.Supplier<RuleEngineCronJobModel> cronJobSupplier)
Given the rule engine Job, create a new instance ofRuleEngineCronJobModeland run it if no other associated cron job is currently in execution- Parameters:
ruleEngineJobCode- the code of the Job to create the cron job withjobPerformableBeanName- name of a bean ofJobPerformableto runcronJobSupplier- a supplier for the instance ofRuleEngineCronJobModel- Returns:
- instance of
RuleEngineCronJobModel
-
-