Back to src/main/java/com/scriptslab/api/scheduler
J
ScheduledTask.java
Java · 48 lines · 766 B
src/main/java/com/scriptslab/api/scheduler/ScheduledTask.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.scriptslab.api.scheduler;
/**
* Represents a scheduled task.
*/
public interface ScheduledTask {
/**
* Gets the task ID.
*
* @return task identifier
*/
int getTaskId();
/**
* Checks if the task is cancelled.
*
* @return true if cancelled
*/
boolean isCancelled();
/**
* Cancels the task.
*/
void cancel();
/**
* Checks if the task is running.
*
* @return true if running
*/
boolean isRunning();
/**
* Checks if the task is synchronous.
*
* @return true if sync
*/
boolean isSync();
/**
* Gets the task owner.
*
* @return owner object
*/
Object getOwner();
}