Interface RuleEngineTaskProcessor<I extends ItemModel,T extends TaskResult>
- Type Parameters:
I- type if the item models to processT- type or expectedTaskResult
- All Known Implementing Classes:
DefaultRuleEngineTaskProcessor
public interface RuleEngineTaskProcessor<I extends ItemModel,T extends TaskResult>
Interface encapsulating the behavior of multi-thread executing in tenant-aware context
-
Method Summary
Modifier and TypeMethodDescriptionProcess the items in the list in multi-thread mode with provided items consumerProcess the items in the list in multi-thread mode with provided items consumer
-
Method Details
-
execute
Process the items in the list in multi-thread mode with provided items consumer- Parameters:
items- the list of items to processtaskConsumer- instance ofConsumerencapsulating the processing logic- Returns:
- The
TaskExecutionFutureof the execution process
-
execute
TaskExecutionFuture<T> execute(List<I> items, Consumer<List<I>> taskConsumer, long predestroyTimeout) Process the items in the list in multi-thread mode with provided items consumer- Parameters:
items- the list of items to processtaskConsumer- instance ofConsumerencapsulating the processing logicpredestroyTimeout- time in milliseconds to wait until forcing the thread join (to prevent eventual thread blocking)- Returns:
- The
TaskExecutionFutureof the execution process
-