Interface ThreadManager


public interface ThreadManager
  • Method Details

    • runMeasuredTask

      Future<Void> runMeasuredTask(TabFeature feature, String type, Runnable task)
      Starts a task in new thread and measures how long it took to process
      Parameters:
      feature - feature to add cpu usage to
      type - usage type to add cpu usage to
      task - the task
    • runMeasuredTask

      Future<Void> runMeasuredTask(String feature, String type, Runnable task)
      Starts a task in new thread and measures how long it took to process
      Parameters:
      feature - feature to add cpu usage to
      type - usage type to add cpu usage to
      task - the task
    • runTask

      Future<Void> runTask(Runnable task)
      Runs task in a new thread
      Parameters:
      task - the task
    • startRepeatingMeasuredTask

      RepeatingTask startRepeatingMeasuredTask(int intervalMilliseconds, TabFeature feature, String type, Runnable task)
      Starts a new task with defined repeat interval that measures cpu usage
      Parameters:
      intervalMilliseconds - task interval
      feature - feature to add cpu usage to
      type - usage type to add cpu usage to
      task - the task
    • startRepeatingTask

      RepeatingTask startRepeatingTask(int intervalMilliseconds, Runnable task)
    • runTaskLater

      Future<?> runTaskLater(int delayMilliseconds, TabFeature feature, String type, Runnable task)
      Runs task with a delay and measures how long it took to process
      Parameters:
      delayMilliseconds - how long to run the task after
      feature - feature to add cpu usage to
      type - usage type to add cpu usage to
      task - the task
      Returns:
      future allowing to cancel the task