Interface RuleEngineTaskProcessor<I extends ItemModel,T extends TaskResult>

Type Parameters:
I - type if the item models to process
T - type or expected TaskResult
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 Details

    • execute

      TaskExecutionFuture<T> execute(List<I> items, Consumer<List<I>> taskConsumer)
      Process the items in the list in multi-thread mode with provided items consumer
      Parameters:
      items - the list of items to process
      taskConsumer - instance of Consumer encapsulating the processing logic
      Returns:
      The TaskExecutionFuture of 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 process
      taskConsumer - instance of Consumer encapsulating the processing logic
      predestroyTimeout - time in milliseconds to wait until forcing the thread join (to prevent eventual thread blocking)
      Returns:
      The TaskExecutionFuture of the execution process