Class ExecutionPlanner

    • Field Detail

      • defaultExecutor

        public static final BlockingExecutorService defaultExecutor
        The default ExecutorService to be used by all planners.

        Set this to change the default. The ExecutorService must not have an unbound queue or an unlimited number of threads. In other words, the executor has to refuse submits when system resources are running out.

      • defaultPlannerFactory

        public static Supplier<ExecutionPlanner> defaultPlannerFactory
        Set this to change the default planner for all modules.
      • numberOfTasks

        protected int numberOfTasks
    • Constructor Detail

      • ExecutionPlanner

        public ExecutionPlanner()
    • Method Detail

      • setNumberOfTasks

        public ExecutionPlanner setNumberOfTasks​(int num)
        Hints this planner about the total number of task until next join().
      • submit

        public abstract void submit​(MultiProcessingTask task)
        Submits the given task for execution.

        Parameters:
        task -
      • join

        public abstract void join()
                           throws Exception
        Blocks the calling thread until all sumitted task have completed execution.
        Throws:
        Exception - If a previously submitted task has thrown an exception then it is re-thrown by the join() method.