Interface RuleEngineJobService

  • All Known Implementing Classes:
    DefaultRuleEngineJobService

    public interface RuleEngineJobService
    The 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
      int countRunningJobs​(java.lang.String ruleEngineJobCode)
      Checks how many currently active cron jobs a RuleEngineJob has
      RuleEngineJobModel getRuleEngineJob​(java.lang.String jobCode, java.lang.String springBeanName)
      Retrieves (or creates one if absent) the RuleEngineJob, identified by given spring Bean name
      boolean isRunning​(java.lang.String ruleEngineJobCode)
      Checks whether the RuleEngineJob has any active cron jobs
      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 of RuleEngineCronJobModel and 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 code
        springBeanName - 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