|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.realtime.SchedulingParameters javax.realtime.PriorityParameters javax.realtime.ImportanceParameters
public class ImportanceParameters
Importance is an additional scheduling metric that may be used by some priority-based scheduling algorithms during overload conditions to differentiate 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
must not
consider importance.
Constructor Summary | |
---|---|
ImportanceParameters(int priority,
int importance)
Create an instance of ImportanceParameters . |
Method Summary | |
---|---|
java.lang.Object |
clone()
Return a clone of this . |
int |
getImportance()
Gets the importance value. |
void |
setImportance(int importance)
Set the importance value. |
java.lang.String |
toString()
Print the value of the priority and importance values of the associated instance of Schedulable |
Methods inherited from class javax.realtime.PriorityParameters |
---|
getPriority, setPriority |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ImportanceParameters(int priority, int importance)
ImportanceParameters
.
priority
- The priority value assigned to schedulable objects that use
this parameter instance.
This value is used in place of the value passed to
Thread.setPriority(int)
.importance
- The importance value assigned to schedulable objects that use
this parameter instance.Method Detail |
---|
public java.lang.Object clone()
SchedulingParameters
this
. This method should behave
effectively as if it constructed a new object with clones of
the high-resolution time values of this.
clone
does not copy any associations from this
and it does not
implicitly bind the new object to a SO.
clone
in class PriorityParameters
public int getImportance()
Schedulable
.public void setImportance(int importance)
RealtimeThread.setSchedulingParameters(SchedulingParameters)
)
the importance of those schedulable objects is altered at
a moment controlled by the schedulers for the respective
schedulable objects.
importance
- The value to which importance is set.
java.lang.IllegalArgumentException
- Thrown if the given importance value is incompatible with the
scheduler for any of the schedulable objects which are presently
using this parameter object.public java.lang.String toString()
Schedulable
toString
in class PriorityParameters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |