javax.realtime
Class PriorityParameters
java.lang.Object
javax.realtime.SchedulingParameters
javax.realtime.PriorityParameters
- Direct Known Subclasses:
- ImportanceParameters
- public class PriorityParameters
- extends SchedulingParameters
Instances of this class should be assigned to threads that are
managed by schedulers which use a single integer to determine
execution order. The base scheduler required by this specification
and represented by the class PriorityScheduler
is such a
scheduler.
- Author:
- Angelo Corsaro
Constructor Summary |
PriorityParameters(int priority)
Create an instance of SchedulingParameters with the given
priority. |
priority
protected int priority
PriorityParameters
public PriorityParameters(int priority)
throws IllegalArgumentException
- Create an instance of SchedulingParameters with the given
priority.
- Parameters:
priority
- The priority assigned to a thread. This value
is used in place of the value returned by
java.lang.Thread.setPriority(int)
- Throws:
IllegalArgumentException
- Thrown if the given
priority value is less than the minimum priority of the
scheduler of any of the associated threads or greater then the
maximum priority of the scheduler of any of the associated
threads.
getPriority
public int getPriority()
- Gets the priority.
- Returns:
- the priority value.
setPriority
public void setPriority(int priority)
throws IllegalArgumentException
- Sets the priority.
- Parameters:
priority
- the new priority.
- Throws:
IllegalArgumentException
- Thrown if the given
priority value is less than the minimum priority of the
scheduler of any of the associated threads or greater then the
maximum priority of the scheduler of any of the associated
threads.
toString
public String toString()
jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2005 Angelo Corsaro and Morgan Deters.