Class TaskExecutor

java.lang.Object
io.bdeploy.common.util.TaskExecutor

public class TaskExecutor extends Object
Simplifies execution and progress reporting for operations that should run in parallel.
  • Constructor Details

    • TaskExecutor

      public TaskExecutor(ActivityReporter reporter)
      Creates a new executor using the given reporter
  • Method Details

    • add

      public void add(Runnable task)
      Adds the given task to the list of task.
    • run

      public void run(String taskName)
      Executes all tasks and waits for completion.
      Parameters:
      taskName - the activity that should be reported