javax.realtime
Class ImportanceParameters
java.lang.Object
|
+--javax.realtime.SchedulingParameters
|
+--javax.realtime.PriorityParameters
|
+--javax.realtime.ImportanceParameters
- public class ImportanceParameters
- extends PriorityParameters
Importance is an additional scheduling metric that may be used
by some priority-based scheduling algorithms during overload
conditions to differenciate execution order among threads of the
same priority.
In some real-time systems an external physical process determines
the period of many threads. If rate-monotonic priority assignment
is used to assign priorities many of the threads in the system may
have the same priority because their periods are the same. However,
it is conceivable that some threads may be more important than
others and in an overload situation importance can help the
scheduler decide which threads to execute first. The base scheduling
algorithm represented by PriorityScheduler
is not
required to use importance. However, the RTSJ strongly suggests to
implementers that a fairly simple subclass of
PriorityScheduler
that uses importance can offer value
to some real-time applications.
Constructor Summary |
ImportanceParameters(int priority,
int importance)
Create an instance of ImportanceParameters . |
Method Summary |
int |
getImportance()
Gets the importance value. |
void |
setImportance(int importance)
Sets the importance. |
java.lang.String |
toString()
Print the value of the importance value of the associated instance
of Schedulable . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
importance
private int importance
ImportanceParameters
public ImportanceParameters(int priority,
int importance)
- Create an instance of
ImportanceParameters
.
- Parameters:
priority
- The priority assigned to an instance of
Schedulable
. This value is used in
place of java.lang.Thread.priority
.importance
- The importance value assigned to an instance
of Schedulable
.
getImportance
public int getImportance()
- Gets the importance value.
- Returns:
- The value of importance for the associated instance of
Schedulable
.
setImportance
public void setImportance(int importance)
- Sets the importance.
toString
public java.lang.String toString()
- Print the value of the importance value of the associated instance
of
Schedulable
.
- Overrides:
toString
in class PriorityParameters
- Returns:
- The string representing the value of priority.