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 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 consumer
      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
    • 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 process
        taskConsumer - instance of Consumer encapsulating the processing logic
        Returns:
        The TaskExecutionFuture of 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 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