public enum TaskPriority extends java.lang.Enum<TaskPriority>
Enum Constant and Description |
---|
DEFAULT |
HIGH |
INSTANT
Great care should be taken when scheduling tasks with
priority
INSTANT ! When a TaskManager
receives a task with this priority it will cancel the
currently executed task if it is not of the same
priority and then immediately run the new task, totally
ignoring any other pending tasks. |
LOW |
NONE
Basically a task scheduled with priority
NONE
is considered to be optional. |
Modifier and Type | Method and Description |
---|---|
int |
intValue() |
static TaskPriority |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TaskPriority[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TaskPriority NONE
NONE
is considered to be optional. It can be cancelled by the
executing TaskManager
at any time and is not guaranteed
to get executed at all.public static final TaskPriority LOW
public static final TaskPriority DEFAULT
public static final TaskPriority HIGH
public static final TaskPriority INSTANT
INSTANT
! When a TaskManager
receives a task with this priority it will cancel the
currently executed task if it is not of the same
priority and then immediately run the new task, totally
ignoring any other pending tasks. Note that a task which
gets cancelled and is not enabled to be re-scheduled might
loose all its progress and its work will not be completed!
This priority value is not used by the TaskManager
as of now!
public static TaskPriority[] values()
for (TaskPriority c : TaskPriority.values()) System.out.println(c);
public static TaskPriority valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int intValue()