Class DefaultRuleCompilationContext
java.lang.Object
de.hybris.platform.ruleengineservices.maintenance.impl.DefaultRuleCompilationContext
- All Implemented Interfaces:
TaskContext,RuleCompilationContext
Default implementation of the
RuleCompilationContext interface-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClean up the context (usually called before the object destroy)protected ConcurrentMapFactoryprotected ConfigurationServiceGet the currently active tenantprotected EventServicegetNextRuleEngineRuleVersion(String moduleName) get the next available rule version for the moduleintget the maximum number of threads to allocate for multi-thread executionget the instance ofRuleCompilerServiceprotected RuleEngineSpliteratorStrategyprotected RulesModuleDaoget the suspend/resume task managerget the thread factory to be used for creating the tenant-aware threadsget the thread pre-destroy timeoutvoidregisterCompilationListeners(String moduleName) register aplication listeners related to rule compilation processresetRuleEngineRuleVersion(String moduleName) Resets the compilation context version to the value associated with rules modulevoidsetConcurrentMapFactory(ConcurrentMapFactory concurrentMapFactory) voidsetConfigurationService(ConfigurationService configurationService) voidsetCurrentTenant(Tenant currentTenant) voidsetEventService(EventService eventService) voidsetRuleCompilerService(RuleCompilerService ruleCompilerService) voidsetRuleEngineSpliteratorStrategy(RuleEngineSpliteratorStrategy ruleEngineSpliteratorStrategy) voidsetRulesModuleDao(RulesModuleDao rulesModuleDao) voidsetSuspendResumeTaskManager(SuspendResumeTaskManager suspendResumeTaskManager) voidsetThreadFactory(ThreadFactory threadFactory) voidsetUp()
-
Field Details
-
WORKER_PRE_DESTROY_TIMEOUT
- See Also:
-
-
Constructor Details
-
DefaultRuleCompilationContext
public DefaultRuleCompilationContext()
-
-
Method Details
-
getCurrentTenant
Description copied from interface:TaskContextGet the currently active tenant- Specified by:
getCurrentTenantin interfaceTaskContext- Returns:
- The active tenant
-
getThreadFactory
Description copied from interface:TaskContextget the thread factory to be used for creating the tenant-aware threads- Specified by:
getThreadFactoryin interfaceTaskContext- Returns:
- the thread factory implementation
-
getRuleCompilerService
Description copied from interface:RuleCompilationContextget the instance ofRuleCompilerService- Specified by:
getRuleCompilerServicein interfaceRuleCompilationContext- Returns:
- instance of
RuleCompilerService
-
getNumberOfThreads
public int getNumberOfThreads()Description copied from interface:TaskContextget the maximum number of threads to allocate for multi-thread execution- Specified by:
getNumberOfThreadsin interfaceTaskContext- Returns:
- number of threads
-
getThreadTimeout
Description copied from interface:TaskContextget the thread pre-destroy timeout- Specified by:
getThreadTimeoutin interfaceTaskContext- Returns:
- number of milliseconds to wait before forcing the thread to join
-
resetRuleEngineRuleVersion
Description copied from interface:RuleCompilationContextResets the compilation context version to the value associated with rules module- Specified by:
resetRuleEngineRuleVersionin interfaceRuleCompilationContext- Parameters:
moduleName- the module name for the series of rules to compile- Returns:
- the instance of
AtomicLongkeeping the module rules version
-
getNextRuleEngineRuleVersion
Description copied from interface:RuleCompilationContextget the next available rule version for the module- Specified by:
getNextRuleEngineRuleVersionin interfaceRuleCompilationContext- Parameters:
moduleName- the module name for the series of rules to compile- Returns:
- a version number
-
cleanup
Description copied from interface:RuleCompilationContextClean up the context (usually called before the object destroy)- Specified by:
cleanupin interfaceRuleCompilationContext- Parameters:
moduleName- the rules module name to be monitored by listeners
-
registerCompilationListeners
Description copied from interface:RuleCompilationContextregister aplication listeners related to rule compilation process- Specified by:
registerCompilationListenersin interfaceRuleCompilationContext- Parameters:
moduleName- the rules module name to be monitored by listeners
-
setUp
@PostConstruct public void setUp() -
setCurrentTenant
-
setThreadFactory
-
setRuleCompilerService
-
setConfigurationService
-
getConfigurationService
-
getRuleEngineSpliteratorStrategy
-
setRuleEngineSpliteratorStrategy
public void setRuleEngineSpliteratorStrategy(RuleEngineSpliteratorStrategy ruleEngineSpliteratorStrategy) -
getRulesModuleDao
-
setRulesModuleDao
-
getEventService
-
setEventService
-
getConcurrentMapFactory
-
setConcurrentMapFactory
-
getSuspendResumeTaskManager
Description copied from interface:RuleCompilationContextget the suspend/resume task manager- Specified by:
getSuspendResumeTaskManagerin interfaceRuleCompilationContext- Returns:
- instance of
SuspendResumeTaskManager
-
setSuspendResumeTaskManager
-