public class PriorityParameters extends SchedulingParameters implements java.lang.Cloneable
Jamaica Real-Time Specification for Java class PriorityParameters.
The default scheduler, PriorityScheduler, uses the priority value provided in the PriorityParameters associated to a schedulable object to determine the execution eligibility.
If two schedulable objects with different current priority values are ready to run, the schedulable object with the higher current priority will always be executed in precedence to the one with lower actual priority.
The current priority is equal to the base priority if no priority inversion avoidance mechanism has increased the priority to a higher value.
Constructor and Description |
---|
PriorityParameters(int priority)
Constructor to create instance of PriorityParameters with the
given initial priority value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
clone creates a clone of this object with the same parameters but
without association to any schedulable object
|
int |
getPriority()
getPriority returns the current priority value
|
void |
setPriority(int priority)
setPriority changes the priority value of this and the current
base priority of all schedulable objects that are associated with
this.
|
java.lang.String |
toString()
toString creates a string of the form
"PriorityParameters(" + priority + ")" |
public PriorityParameters(int priority)
priority
- the initial priority value.public int getPriority()
public void setPriority(int priority) throws java.lang.IllegalArgumentException
priority
- the new priority value.java.lang.IllegalArgumentException
- if priority is not applicable
to any scheduler of the associated schedulable objectsjava.lang.IllegalArgumentException
- in case there
are no associated schedulable objects ant the priority is larger than
PriorityScheduler.getMaxPriority() or priority is less
Thread.MIN_PRIORITY.public java.lang.String toString()
"PriorityParameters(" + priority + ")"
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class SchedulingParameters
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2017 aicas GmbH. All Rights Reserved.