aicas logoJamaicaVM 3.4 rel 9
RTSJ Implementation

javax.realtime
Class PriorityParameters

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

public class PriorityParameters
extends SchedulingParameters
implements java.lang.Cloneable

Jamaica Realtime Specification for Java class PriorityParameters.

The default scheduler, PriorityScheduler, uses the priority value provides in the PriorityParameters associated to a schedulable object to determine the execution eligibility.

If two schedulable objects with different actual priority values are ready to run, the schedulable object with the higher actual priority will always be executed in precendence to the one with lower actual priority.

The actual priority is equal to the base priority if no priority inversion avoidance mechanisms has increased the priority to a higher value.


Constructor Summary
PriorityParameters(int priority)
          Constructor to create instance of PriorityParameters with the given initial priority value.
 
Method Summary
 java.lang.Object clone()
          clone create a clone of this object with the same parameters but without association to any schedulable object
 int getPriority()
          getPriority returns the current priority value
 void setPriority(int priority)
          setPriority changes the priority value of this and the current base priority of all schedulable objects that are associated with this.
 java.lang.String toString()
          toString creates a string of the form "PriorityParameters("+priority+")"
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PriorityParameters

public PriorityParameters(int priority)
Constructor to create instance of PriorityParameters with the given initial priority value.

Parameters:
priority - the initial priority value.
Method Detail

getPriority

public int getPriority()
getPriority returns the current priority value

Returns:
the current priority value.

setPriority

public void setPriority(int priority)
                 throws java.lang.IllegalArgumentException
setPriority changes the priority value of this and the current base priority of all schedulable objects that are associated with this.

Parameters:
priority - the new priority value.
Throws:
java.lang.IllegalArgumentException - if priority is larger than PriorityScheduler.getMaxPriority() or priority is less than PriorityScheduler.getMinPriority() (if -strictRTSJ is set) or it is less then Thread.MIN_PRIORITY (if -strictRTSJ is not set).

toString

public java.lang.String toString()
toString creates a string of the form "PriorityParameters("+priority+")"

Overrides:
toString in class java.lang.Object
Returns:
the string represantation of this.

clone

public java.lang.Object clone()
clone create a clone of this object with the same parameters but without association to any schedulable object

Overrides:
clone in class java.lang.Object
Returns:
an new instance of PriorityParameters with equal priority argument.
Since:
RTSJ V1.0.1

aicas logoJamaicaVM 3.4 rel 9
RTSJ Implementation

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2009 aicas GmbH. All Rights Reserved.