javax.realtime
Class PriorityScheduler

java.lang.Object
  |
  +--javax.realtime.Scheduler
        |
        +--javax.realtime.PriorityScheduler

public class PriorityScheduler
extends Scheduler


Field Summary
static int MAX_PRIORITY
           
static int MIN_PRIORITY
           
 
Constructor Summary
protected PriorityScheduler()
           
 
Method Summary
protected  boolean addToFeasibility(Schedulable schedulable)
          Inform the scheduler that this thread's ReleaseParameters should be considered in feasibility analysis until further notified.
 void fireSchedulable(Schedulable schedulable)
          Trigger the execution of a schedulable object (like an AsyncEventHandler).
 int getMaxPriority()
          Returns the maximum priority available for a thread managed by this scheduler.
static int getMaxPriority(java.lang.Thread thread)
          If the given thread is scheduled by the required PriorityScheduler the maximum priority of the PriorityScheduler is returned otherwise Thread.MAX_PRIORITY is returned.
 int getMinPriority()
          Returns the minimum priority available for a thread managed by this scheduler.
static int getMinPriority(java.lang.Thread thread)
          If the given thread is scheduled by the required PriorityScheduler the minimum priority of the PriorityScheduler is returned otherwise Thread.MIN_PRIORITY is returned.
 int getNormPriority()
          Returns the normal priority available for a thread managed by this scheduler.
static int getNormPriority(java.lang.Thread thread)
          If the given thread is scheduled by the required PriorityScheduler the normal priority of the PriorityScheduler is returned otherwise Thread.NORM_PRIORITY is returned.
 java.lang.String getPolicyName()
          Used to determine the policy of the Scheduler.
static PriorityScheduler instance()
          Return a pointer to an instance of PriorityScheduler.
 boolean isFeasible()
          Returns true if and only if the system is able to satisfy the constraints expressed in the release parameters of the existing schedulable objects.
protected  boolean removeFromFeasibility(Schedulable schedulable)
          Inform the scheduler that this thread's ReleaseParameters should not be considered in feasibility analysis until further notified.
 boolean setIfFeasible(Schedulable schedulable, ReleaseParameters release, MemoryParameters memory)
          Returns true if, after changing the Schedulable's release and GC parameters isFeasible would return true.
 boolean setIfFeasible(Schedulable schedulable, ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
           
 
Methods inherited from class javax.realtime.Scheduler
getDefaultScheduler, setDefaultScheduler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_PRIORITY

public static final int MAX_PRIORITY

MIN_PRIORITY

public static final int MIN_PRIORITY
Constructor Detail

PriorityScheduler

protected PriorityScheduler()
Method Detail

isFeasible

public boolean isFeasible()
Description copied from class: Scheduler
Returns true if and only if the system is able to satisfy the constraints expressed in the release parameters of the existing schedulable objects.
Overrides:
isFeasible in class Scheduler

instance

public static PriorityScheduler instance()
Return a pointer to an instance of PriorityScheduler.

addToFeasibility

protected boolean addToFeasibility(Schedulable schedulable)
Description copied from class: Scheduler
Inform the scheduler that this thread's ReleaseParameters should be considered in feasibility analysis until further notified.
Overrides:
addToFeasibility in class Scheduler

removeFromFeasibility

protected boolean removeFromFeasibility(Schedulable schedulable)
Description copied from class: Scheduler
Inform the scheduler that this thread's ReleaseParameters should not be considered in feasibility analysis until further notified.
Overrides:
removeFromFeasibility in class Scheduler

setIfFeasible

public boolean setIfFeasible(Schedulable schedulable,
                             ReleaseParameters release,
                             MemoryParameters memory)
Description copied from class: Scheduler
Returns true if, after changing the Schedulable's release and GC parameters isFeasible would return true. The parameters wil be changed. If the resulting system would not be feasible, this method returns false and no changes are made.
Overrides:
setIfFeasible in class Scheduler
Tags copied from class: Scheduler
Parameters:
schedulable - The Schedulable object for which to check admittance. If null nothing happens.
release - The proposed ReleaseParameters. If null, no change is made.
memory - The proposed MemoryParameters. If null, no change is made.

setIfFeasible

public boolean setIfFeasible(Schedulable schedulable,
                             ReleaseParameters release,
                             MemoryParameters memory,
                             ProcessingGroupParameters group)
Overrides:
setIfFeasible in class Scheduler

fireSchedulable

public void fireSchedulable(Schedulable schedulable)
Description copied from class: Scheduler
Trigger the execution of a schedulable object (like an AsyncEventHandler).
Overrides:
fireSchedulable in class Scheduler
Tags copied from class: Scheduler
Parameters:
h - The schedulable object to make active.

getMaxPriority

public int getMaxPriority()
Returns the maximum priority available for a thread managed by this scheduler.

getMaxPriority

public static int getMaxPriority(java.lang.Thread thread)
If the given thread is scheduled by the required PriorityScheduler the maximum priority of the PriorityScheduler is returned otherwise Thread.MAX_PRIORITY is returned.
Parameters:
thread - An instance of Thread. If null the maximum priority of the required PriorityScheduler is returned.

getMinPriority

public int getMinPriority()
Returns the minimum priority available for a thread managed by this scheduler.

getMinPriority

public static int getMinPriority(java.lang.Thread thread)
If the given thread is scheduled by the required PriorityScheduler the minimum priority of the PriorityScheduler is returned otherwise Thread.MIN_PRIORITY is returned.
Parameters:
thread - An instance of Thread. If null the minimum priority of the required PriorityScheduler is returned.

getNormPriority

public int getNormPriority()
Returns the normal priority available for a thread managed by this scheduler.

getNormPriority

public static int getNormPriority(java.lang.Thread thread)
If the given thread is scheduled by the required PriorityScheduler the normal priority of the PriorityScheduler is returned otherwise Thread.NORM_PRIORITY is returned.
Parameters:
thread - An instance of Thread. If null the normal priority of the required PriorityScheduler is returned.

getPolicyName

public java.lang.String getPolicyName()
Description copied from class: Scheduler
Used to determine the policy of the Scheduler.
Overrides:
getPolicyName in class Scheduler
Tags copied from class: Scheduler
Returns:
A String object which is the name of the scheduling policy used by this.