aicas logoJamaica 6.4 release 1

javax.realtime
Class ImportanceParameters

java.lang.Object
  extended by javax.realtime.SchedulingParameters
      extended by javax.realtime.PriorityParameters
          extended by javax.realtime.ImportanceParameters
All Implemented Interfaces:
Cloneable

public class ImportanceParameters
extends PriorityParameters

Jamaica Real-Time Specification for Java class ImportanceParameters.

This class is an extension of PriorityParameters that provides an importance value to be able to define an order for schedulable objects that share the same priority. This importance may be used in overload situations to decide which task to execute in preference to another.

The default PriorityScheduler used by JamaicaVM does not consider importance parameters in its scheduling decisions.


Constructor Summary
ImportanceParameters(int priority, int importance)
          Constructor to create an instance of ImportanceParameters with the given priority and importance values.
 
Method Summary
 Object clone()
          clone creates a clone of this object with the same parameters but without association to any schedulable object
 int getImportance()
          getImportance returns the current importance parameter.
 void setImportance(int importance)
          setImportance sets the importance parameters for this and all schedulable objects associated with this ImportanceParameters.
 String toString()
          toString creates a string of the form "ImportanceParameters("+ priority++", "+ importance+")"
 
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

ImportanceParameters

public ImportanceParameters(int priority,
                            int importance)
Constructor to create an instance of ImportanceParameters with the given priority and importance values.

Parameters:
priority - the new priority value.
importance - the new importance value.
Throws:
IllegalArgumentException - iff importance is negative.
Method Detail

getImportance

public int getImportance()
getImportance returns the current importance parameter.

Returns:
the current importance value.

setImportance

public void setImportance(int importance)
setImportance sets the importance parameters for this and all schedulable objects associated with this ImportanceParameters.

Parameters:
importance - the new importance value.
Throws:
IllegalArgumentException - iff importance is negative.

toString

public String toString()
toString creates a string of the form "ImportanceParameters("+ priority++", "+ importance+")"

Overrides:
toString in class PriorityParameters
Returns:
the string representation of this.

clone

public Object clone()
clone creates a clone of this object with the same parameters but without association to any schedulable object

Overrides:
clone in class PriorityParameters
Returns:
a new instance of ImportanceParameters with equal importance argument.
Since:
RTSJ V1.0.1

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.