Class DefaultTaskContext
- java.lang.Object
-
- de.hybris.platform.ruleengine.concurrency.impl.DefaultTaskContext
-
- All Implemented Interfaces:
TaskContext
public class DefaultTaskContext extends java.lang.Object implements TaskContext
Default implementation of theTaskContextinterface
-
-
Constructor Summary
Constructors Constructor Description DefaultTaskContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConcurrentMapFactorygetConcurrentMapFactory()protected ConfigurationServicegetConfigurationService()TenantgetCurrentTenant()Get the currently active tenantintgetNumberOfThreads()get the maximum number of threads to allocate for multi-thread executionprotected RuleEngineSpliteratorStrategygetRuleEngineSpliteratorStrategy()protected RulesModuleDaogetRulesModuleDao()java.util.concurrent.ThreadFactorygetThreadFactory()get the thread factory to be used for creating the tenant-aware threadsjava.lang.LonggetThreadTimeout()get the thread pre-destroy timeoutvoidsetConcurrentMapFactory(ConcurrentMapFactory concurrentMapFactory)voidsetConfigurationService(ConfigurationService configurationService)voidsetCurrentTenant(Tenant currentTenant)voidsetRuleEngineSpliteratorStrategy(RuleEngineSpliteratorStrategy ruleEngineSpliteratorStrategy)voidsetRulesModuleDao(RulesModuleDao rulesModuleDao)voidsetThreadFactory(java.util.concurrent.ThreadFactory threadFactory)
-
-
-
Method Detail
-
getCurrentTenant
public Tenant getCurrentTenant()
Description copied from interface:TaskContextGet the currently active tenant- Specified by:
getCurrentTenantin interfaceTaskContext- Returns:
- The active tenant
-
getThreadFactory
public java.util.concurrent.ThreadFactory 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
public java.lang.Long 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
public void setCurrentTenant(Tenant currentTenant)
-
setThreadFactory
public void setThreadFactory(java.util.concurrent.ThreadFactory threadFactory)
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
getRulesModuleDao
protected RulesModuleDao getRulesModuleDao()
-
setRulesModuleDao
public void setRulesModuleDao(RulesModuleDao rulesModuleDao)
-
getConcurrentMapFactory
protected ConcurrentMapFactory getConcurrentMapFactory()
-
setConcurrentMapFactory
public void setConcurrentMapFactory(ConcurrentMapFactory concurrentMapFactory)
-
getRuleEngineSpliteratorStrategy
protected RuleEngineSpliteratorStrategy getRuleEngineSpliteratorStrategy()
-
setRuleEngineSpliteratorStrategy
public void setRuleEngineSpliteratorStrategy(RuleEngineSpliteratorStrategy ruleEngineSpliteratorStrategy)
-
-