Class TabRepeatingTask

java.lang.Object
me.neznamy.tab.shared.TabRepeatingTask
All Implemented Interfaces:
me.neznamy.tab.api.task.RepeatingTask

public class TabRepeatingTask extends Object implements me.neznamy.tab.api.task.RepeatingTask
Implementation of RepeatingTask interface which submits provided task to TAB's processing thread in configured interval.
  • Constructor Details

    • TabRepeatingTask

      public TabRepeatingTask(ExecutorService exe, Runnable runnable, me.neznamy.tab.api.TabFeature feature, String type, int interval)
      Constructs new instance with given parameters and starts the task.
      Parameters:
      exe - Executor service to submit the repeating task to
      runnable - Task to run periodically
      feature - Feature creating this task, used in cpu command output
      type - Sub-feature creating this task, used in cpu command output
      interval - Interval in milliseconds how often to submit the task to main thread
  • Method Details

    • getInterval

      public int getInterval()
      Specified by:
      getInterval in interface me.neznamy.tab.api.task.RepeatingTask
    • setInterval

      public void setInterval(int interval)
      Specified by:
      setInterval in interface me.neznamy.tab.api.task.RepeatingTask
    • cancel

      public void cancel()
      Specified by:
      cancel in interface me.neznamy.tab.api.task.RepeatingTask