Package com.anylogic.engine
- java.lang.Object
-
- java.lang.Enum<TaskPreemptionPolicy>
-
- com.anylogic.engine.TaskPreemptionPolicy
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TaskPreemptionPolicy>
public enum TaskPreemptionPolicy extends java.lang.Enum<TaskPreemptionPolicy>
TaskPreemptionPolicy
PP_CONTINUE_WITHOUT_RESOURCE |
Entity-service specific policy.
|
PP_NO_PREEMPTION |
The task cannot be interrupted by any high priority task
|
PP_SEIZE_ANY_RESOURCE |
|
PP_TERMINATE_SERVING |
The unit task will be interrupted by any task with higher priority and will be terminated (forgotten).
Entity will not be suspended. |
PP_WAIT_FOR_ORIGINAL_RESOURCE |
|
Enum Constant | Description |
---|
static TaskPreemptionPolicy |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static TaskPreemptionPolicy[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method | Description |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final TaskPreemptionPolicy PP_NO_PREEMPTION
The task cannot be interrupted by any high priority task
public static final TaskPreemptionPolicy PP_TERMINATE_SERVING
The unit task will be interrupted by any task with higher priority and will be terminated (forgotten).
Entity will not be suspended. It will just lose ALL resource units obtained in this Seize. Custom action may be defined using "On Task Terminated" (where the default action is remove entity from its current flowchart block)
Entity will not be suspended. It will just lose ALL resource units obtained in this Seize. Custom action may be defined using "On Task Terminated" (where the default action is remove entity from its current flowchart block)
public static final TaskPreemptionPolicy PP_CONTINUE_WITHOUT_RESOURCE
Entity-service specific policy.
The unit task will be interrupted by any task with higher priority and will be terminated (forgotten).
Entity will not be suspended. It will just lose ONLY one resource unit (which is being preempted).
Custom action may be defined using "On Task lost unit" (where the default action
is remove entity from its current flowchart block)
public static final TaskPreemptionPolicy PP_SEIZE_ANY_RESOURCE
public static final TaskPreemptionPolicy PP_WAIT_FOR_ORIGINAL_RESOURCE
public static TaskPreemptionPolicy[] values()
Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (TaskPreemptionPolicy c : TaskPreemptionPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
public static TaskPreemptionPolicy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
How can we improve this article?
-