I - type of ItemModel in the listpublic class DefaultRuleEngineTaskProcessor<I extends ItemModel> extends java.lang.Object implements RuleEngineTaskProcessor<I,TaskResult>, RuleEngineSpliteratorStrategy
RuleEngineTaskProcessor| Constructor and Description |
|---|
DefaultRuleEngineTaskProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Thread |
createAndStartNewWorker(java.util.List<I> items,
java.util.function.Consumer<java.util.List<I>> taskConsumer) |
TaskExecutionFuture<TaskResult> |
execute(java.util.List<I> items,
java.util.function.Consumer<java.util.List<I>> taskConsumer)
Process the items in the list in multi-thread mode with provided items consumer
|
TaskExecutionFuture<TaskResult> |
execute(java.util.List<I> items,
java.util.function.Consumer<java.util.List<I>> taskConsumer,
long predestroyTimeout)
Process the items in the list in multi-thread mode with provided items consumer
|
int |
getNumberOfThreads()
get the number of threads to be allocated for spliterator
|
protected SuspendResumeTaskManager |
getSuspendResumeTaskManager() |
protected Tenant |
getTenant() |
protected java.util.concurrent.ThreadFactory |
getTenantAwareThreadFactory() |
void |
setSuspendResumeTaskManager(SuspendResumeTaskManager suspendResumeTaskManager) |
void |
setTenant(Tenant tenant) |
void |
setTenantAwareThreadFactory(java.util.concurrent.ThreadFactory tenantAwareThreadFactory) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPartitionSizepublic TaskExecutionFuture<TaskResult> execute(java.util.List<I> items, java.util.function.Consumer<java.util.List<I>> taskConsumer)
RuleEngineTaskProcessorexecute in interface RuleEngineTaskProcessor<I extends ItemModel,TaskResult>items - the list of items to processtaskConsumer - instance of Consumer encapsulating the processing logicTaskExecutionFuture of the execution processpublic TaskExecutionFuture<TaskResult> execute(java.util.List<I> items, java.util.function.Consumer<java.util.List<I>> taskConsumer, long predestroyTimeout)
RuleEngineTaskProcessorexecute in interface RuleEngineTaskProcessor<I extends ItemModel,TaskResult>items - the list of items to processtaskConsumer - instance of Consumer encapsulating the processing logicpredestroyTimeout - time in milliseconds to wait until forcing the thread join (to prevent eventual thread blocking)TaskExecutionFuture of the execution processpublic int getNumberOfThreads()
RuleEngineSpliteratorStrategygetNumberOfThreads in interface RuleEngineSpliteratorStrategyprotected java.lang.Thread createAndStartNewWorker(java.util.List<I> items, java.util.function.Consumer<java.util.List<I>> taskConsumer)
protected Tenant getTenant()
public void setTenant(Tenant tenant)
protected java.util.concurrent.ThreadFactory getTenantAwareThreadFactory()
public void setTenantAwareThreadFactory(java.util.concurrent.ThreadFactory tenantAwareThreadFactory)
protected SuspendResumeTaskManager getSuspendResumeTaskManager()
public void setSuspendResumeTaskManager(SuspendResumeTaskManager suspendResumeTaskManager)
Copyright © 2018 SAP SE. All Rights Reserved.