Class DefaultTaskContext
java.lang.Object
de.hybris.platform.ruleengine.concurrency.impl.DefaultTaskContext
- All Implemented Interfaces:
TaskContext
Default implementation of the
TaskContext interface-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ConcurrentMapFactoryprotected ConfigurationServiceGet the currently active tenantintget the maximum number of threads to allocate for multi-thread executionprotected RuleEngineSpliteratorStrategyprotected RulesModuleDaoget the thread factory to be used for creating the tenant-aware threadsget the thread pre-destroy timeoutvoidsetConcurrentMapFactory(ConcurrentMapFactory concurrentMapFactory) voidsetConfigurationService(ConfigurationService configurationService) voidsetCurrentTenant(Tenant currentTenant) voidsetRuleEngineSpliteratorStrategy(RuleEngineSpliteratorStrategy ruleEngineSpliteratorStrategy) voidsetRulesModuleDao(RulesModuleDao rulesModuleDao) voidsetThreadFactory(ThreadFactory threadFactory)
-
Constructor Details
-
DefaultTaskContext
public DefaultTaskContext()
-
-
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
-
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
-
setCurrentTenant
-
setThreadFactory
-
setConfigurationService
-
getConfigurationService
-
getRulesModuleDao
-
setRulesModuleDao
-
getConcurrentMapFactory
-
setConcurrentMapFactory
-
getRuleEngineSpliteratorStrategy
-
setRuleEngineSpliteratorStrategy
public void setRuleEngineSpliteratorStrategy(RuleEngineSpliteratorStrategy ruleEngineSpliteratorStrategy)
-