Class DefaultRuleEngineTaskProcessor<I extends ItemModel>

    • Constructor Detail

      • DefaultRuleEngineTaskProcessor

        public DefaultRuleEngineTaskProcessor()
    • Method Detail

      • execute

        public TaskExecutionFuture<TaskResult> execute​(java.util.List<I> items,
                                                       java.util.function.Consumer<java.util.List<I>> taskConsumer,
                                                       long predestroyTimeout)
        Description copied from interface: RuleEngineTaskProcessor
        Process the items in the list in multi-thread mode with provided items consumer
        Specified by:
        execute in interface RuleEngineTaskProcessor<I extends ItemModel,​TaskResult>
        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
      • createAndStartNewWorker

        protected java.lang.Thread createAndStartNewWorker​(java.util.List<I> items,
                                                           java.util.function.Consumer<java.util.List<I>> taskConsumer)
      • getTenant

        protected Tenant getTenant()
      • setTenant

        public void setTenant​(Tenant tenant)
      • getTenantAwareThreadFactory

        protected java.util.concurrent.ThreadFactory getTenantAwareThreadFactory()
      • setTenantAwareThreadFactory

        public void setTenantAwareThreadFactory​(java.util.concurrent.ThreadFactory tenantAwareThreadFactory)
      • setSuspendResumeTaskManager

        public void setSuspendResumeTaskManager​(SuspendResumeTaskManager suspendResumeTaskManager)