public class PriorityParameters extends SchedulingParameters implements Cloneable
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 |
---|---|
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
|
PriorityParameters |
setPriority(int priority)
setPriority changes the priority value of this and the current
base priority of all schedulable objects that are associated with
this.
|
String |
toString()
toString creates a string of the form
"PriorityParameters(" + priority + ")" |
subsumes
public PriorityParameters(int priority)
priority
- the initial priority value.public int getPriority()
public PriorityParameters setPriority(int priority) throws StaticIllegalArgumentException
StaticIllegalArgumentException
- when priority is not applicable
to any scheduler of the associated schedulable objectspriority
- the new priority value.public String toString()
"PriorityParameters(" + priority + ")"
public Object clone()
clone
in class SchedulingParameters
Cloneable
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.