Class DefaultRuleCompilationContext

    • Field Detail

      • WORKER_PRE_DESTROY_TIMEOUT

        public static final java.lang.String WORKER_PRE_DESTROY_TIMEOUT
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultRuleCompilationContext

        public DefaultRuleCompilationContext()
    • Method Detail

      • getThreadFactory

        public java.util.concurrent.ThreadFactory getThreadFactory()
        Description copied from interface: TaskContext
        get the thread factory to be used for creating the tenant-aware threads
        Specified by:
        getThreadFactory in interface TaskContext
        Returns:
        the thread factory implementation
      • getNumberOfThreads

        public int getNumberOfThreads()
        Description copied from interface: TaskContext
        get the maximum number of threads to allocate for multi-thread execution
        Specified by:
        getNumberOfThreads in interface TaskContext
        Returns:
        number of threads
      • getThreadTimeout

        public java.lang.Long getThreadTimeout()
        Description copied from interface: TaskContext
        get the thread pre-destroy timeout
        Specified by:
        getThreadTimeout in interface TaskContext
        Returns:
        number of milliseconds to wait before forcing the thread to join
      • resetRuleEngineRuleVersion

        public java.util.concurrent.atomic.AtomicLong resetRuleEngineRuleVersion​(java.lang.String moduleName)
        Description copied from interface: RuleCompilationContext
        Resets the compilation context version to the value associated with rules module
        Specified by:
        resetRuleEngineRuleVersion in interface RuleCompilationContext
        Parameters:
        moduleName - the module name for the series of rules to compile
        Returns:
        the instance of AtomicLong keeping the module rules version
      • getNextRuleEngineRuleVersion

        public java.lang.Long getNextRuleEngineRuleVersion​(java.lang.String moduleName)
        Description copied from interface: RuleCompilationContext
        get the next available rule version for the module
        Specified by:
        getNextRuleEngineRuleVersion in interface RuleCompilationContext
        Parameters:
        moduleName - the module name for the series of rules to compile
        Returns:
        a version number
      • cleanup

        public void cleanup​(java.lang.String moduleName)
        Description copied from interface: RuleCompilationContext
        Clean up the context (usually called before the object destroy)
        Specified by:
        cleanup in interface RuleCompilationContext
        Parameters:
        moduleName - the rules module name to be monitored by listeners
      • registerCompilationListeners

        public void registerCompilationListeners​(java.lang.String moduleName)
        Description copied from interface: RuleCompilationContext
        register aplication listeners related to rule compilation process
        Specified by:
        registerCompilationListeners in interface RuleCompilationContext
        Parameters:
        moduleName - the rules module name to be monitored by listeners
      • setUp

        @PostConstruct
        public void setUp()
      • setCurrentTenant

        public void setCurrentTenant​(Tenant currentTenant)
      • setThreadFactory

        public void setThreadFactory​(java.util.concurrent.ThreadFactory threadFactory)
      • setRuleCompilerService

        public void setRuleCompilerService​(RuleCompilerService ruleCompilerService)
      • setConfigurationService

        public void setConfigurationService​(ConfigurationService configurationService)
      • setRuleEngineSpliteratorStrategy

        public void setRuleEngineSpliteratorStrategy​(RuleEngineSpliteratorStrategy ruleEngineSpliteratorStrategy)
      • setRulesModuleDao

        public void setRulesModuleDao​(RulesModuleDao rulesModuleDao)
      • getEventService

        protected EventService getEventService()
      • setEventService

        public void setEventService​(EventService eventService)
      • setConcurrentMapFactory

        public void setConcurrentMapFactory​(ConcurrentMapFactory concurrentMapFactory)
      • setSuspendResumeTaskManager

        public void setSuspendResumeTaskManager​(SuspendResumeTaskManager suspendResumeTaskManager)