Package me.neznamy.tab.shared
Class TabRepeatingTask
java.lang.Object
me.neznamy.tab.shared.TabRepeatingTask
- All Implemented Interfaces:
me.neznamy.tab.api.task.RepeatingTask
Implementation of RepeatingTask interface which submits provided task
to TAB's processing thread in configured interval.
-
Constructor Summary
ConstructorsConstructorDescriptionTabRepeatingTask(ExecutorService exe, Runnable runnable, me.neznamy.tab.api.TabFeature feature, String type, int interval) Constructs new instance with given parameters and starts the task. -
Method Summary
-
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 torunnable- Task to run periodicallyfeature- Feature creating this task, used in cpu command outputtype- Sub-feature creating this task, used in cpu command outputinterval- Interval in milliseconds how often to submit the task to main thread
-
-
Method Details
-
getInterval
public int getInterval()- Specified by:
getIntervalin interfaceme.neznamy.tab.api.task.RepeatingTask
-
setInterval
public void setInterval(int interval) - Specified by:
setIntervalin interfaceme.neznamy.tab.api.task.RepeatingTask
-
cancel
public void cancel()- Specified by:
cancelin interfaceme.neznamy.tab.api.task.RepeatingTask
-