aicas logoJamaica 6.4 release 1

javax.realtime
Class PriorityParameters

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

public class PriorityParameters
extends SchedulingParameters
implements Cloneable

Jamaica Real-Time 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 current priority values are ready to run, the schedulable object with the higher current priority will always be executed in precedence to the one with lower actual priority.

The current priority is equal to the base priority if no priority inversion avoidance mechanism 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
 Object clone()
          clone creates 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.
 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 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:
IllegalArgumentException - if priority is not applicable to any scheduler of the associated schedulable objects
IllegalArgumentException - in case there are no associated schedulable objects ant the priority is larger than PriorityScheduler.getMaxPriority() or priority is less Thread.MIN_PRIORITY.

toString

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

Overrides:
toString in class Object
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 SchedulingParameters
Returns:
a new instance of PriorityParameters with equal priority 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.