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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TaskExecutionFuture<T>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 consumerTaskExecutionFuture<T>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
-
-
-
Method Detail
-
execute
TaskExecutionFuture<T> 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- Parameters:
items- the list of items to processtaskConsumer- instance ofConsumerencapsulating the processing logic- Returns:
- The
TaskExecutionFutureof the execution process
-
execute
TaskExecutionFuture<T> 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- 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
-
-