Generic cleaning

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
Bukkit/Spigot
2012-01-15 14:37:30 +01:00
parent 8377ee22f8
commit 4c80a49933
61 changed files with 245 additions and 272 deletions

View File

@@ -76,7 +76,7 @@ public interface BukkitScheduler {
/**
* Calls a method on the main thread and returns a Future object
* This task will be executed by the main server thread
*
* <p />
* Note: The Future.get() methods must NOT be called from the main thread
* Note2: There is at least an average of 10ms latency until the isDone() method returns true
*
@@ -108,33 +108,33 @@ public interface BukkitScheduler {
/**
* Check if the task currently running.
*
* <p />
* A repeating task might not be running currently, but will be running in the future.
* A task that has finished, and does not repeat, will not be running ever again.
*
* <p />
* Explicitly, a task is running if there exists a thread for it, and that thread is alive.
*
* @param taskId The task to check.
*
* <p />
* @return If the task is currently running.
*/
public boolean isCurrentlyRunning(int taskId);
/**
* Check if the task queued to be run later.
*
* <p />
* If a repeating task is currently running, it might not be queued now but could be in the future.
* A task that is not queued, and not running, will not be queued again.
*
* @param taskId The task to check.
*
* <p />
* @return If the task is queued to be run.
*/
public boolean isQueued(int taskId);
/**
* Returns a list of all active workers.
*
* <p />
* This list contains asynch tasks that are being executed by separate threads.
*
* @return Active workers

View File

@@ -5,7 +5,7 @@ import org.bukkit.plugin.Plugin;
/**
* Represents a worker thread for the scheduler. This gives information about
* the Thread object for the task, owner of the task and the taskId.
*
* </p>
* Workers are used to execute async tasks.
*/