|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.realtime.Scheduler
javax.realtime.PriorityScheduler
This class implements a priority scheduler.
| Field Summary | |
static int |
MAX_PRIORITY
Deprecated. Use getMaxPriority() instead. |
static int |
MIN_PRIORITY
Deprecated. Use getMinPriority() instead. |
| Constructor Summary | |
protected |
PriorityScheduler()
|
| Method Summary | |
protected boolean |
addToFeasibility(Schedulable schedulable)
Inform the scheduler and cooperating facilities that the resource demands, as expressed in the associated instances of SchedulingParameters , ReleaseParameters,
MemoryParameters ,and ProcessingGroupParameters, of this instance of Schedulable will be considered in the feasibility analysis of
the associated Scheduler until further notice. |
int |
computeExecutionEligibility(Schedulable schedulable)
Computes the exectuion eligibility that is currently associated to a schedulable object. |
void |
fireSchedulable(Schedulable schedulable)
Trigger the execution of a schedulable object (like an instance of AsyncEventHandler). |
ReleaseParameters |
getDefaultReleaseParameters()
Get the default ReleaseParameters (in case null
is passed in place of ReleaseParameters to a Schedulable). |
SchedulingParameters |
getDefaultSchedulingParameters()
Get the default SchedulingParameters (in case
null is passed in place of SchedulingParameters to
a Schedulable). |
int |
getMaxPriority()
Get the maximum priority available for a thread managed by this scheduler. |
int |
getMaxPriority(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()
Get the minimum priority available for a thread managed by this scheduler. |
int |
getMinPriority(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. |
int |
getNormPriority(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. |
String |
getPolicyName()
Used to determine the policy of the Scheduler |
static PriorityScheduler |
instance()
Get the PriorityScheduler singleton instance. |
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. |
void |
notifyThreadStart(RealtimeThread thread)
|
protected boolean |
removeFromFeasibility(Schedulable schedulable)
Inform the scheduler and cooperating facilities that the resource demands, as expressed in the associated instances of SchedulingParameters , ReleaseParameters,
MemoryParameters ,and ProcessingGroupParameters, of this instance of Schedulable
should no longer be considered in the feasibility analysis of
the associated Scheduler . |
boolean |
setIfFeasible(Schedulable schedulable,
ReleaseParameters release,
MemoryParameters memory)
Returns true if, after considering the values of the parameters, the task set would still be feasible. |
boolean |
setIfFeasible(Schedulable schedulable,
ReleaseParameters release,
MemoryParameters memory,
ProcessingGroupParameters group)
Returns true if, after considering the values of the parameters, the task set would still be feasible. |
boolean |
setIfFeasible(Schedulable schedulable,
SchedulingParameters scheduling,
ReleaseParameters release,
MemoryParameters memory,
ProcessingGroupParameters group)
Returns true if, after considering the values of the parameters, the task set would still be feasible. |
boolean |
validateSchedulingParameters(Schedulable schedulable)
Makes sure that the thread has the right set of scheduling parameters for this scheduler. |
| Methods inherited from class javax.realtime.Scheduler |
getDefaultScheduler, notifyThreadCompletion, setDefaultScheduler |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MAX_PRIORITY
getMaxPriority() instead.
public static final int MIN_PRIORITY
getMinPriority() instead.
| Constructor Detail |
protected PriorityScheduler()
| Method Detail |
public void fireSchedulable(Schedulable schedulable)
AsyncEventHandler).
fireSchedulable in class Schedulerschedulable - the Schedulable object to make active.public int getMaxPriority()
int value representing the maximum
priority available.public int getMaxPriority(Thread thread)
thread - An instance of Thread. If null the maximum
priority of the required PriorityScheduler is returned.
int value representing the maximum
priority.public int getMinPriority()
int value representing the minumum
priority level available.public int getMinPriority(Thread thread)
thread - An instance of Thread. If null the minimum
priority of the required PriorityScheduler is returned.
int value representing the minimum
priority.public int getNormPriority()
int value representing the normal
priority.public int getNormPriority(Thread thread)
PriorityScheduler the normal priority of the
PriorityScheduler is returned otherwise
Thread.NORM_PRIORITY is returned.
thread - An instance of Thread. If null the normal
priority of the required PriorityScheduler is returned.
int value representing the normal
priority.public String getPolicyName()
Scheduler
getPolicyName in class SchedulerString object which is the name of the
scheduling policy used by thispublic static PriorityScheduler instance()
PriorityScheduler singleton instance.
PriorityScheduler
singleton.public boolean isFeasible()
isFeasible in class Schedulerprotected boolean addToFeasibility(Schedulable schedulable)
SchedulingParameters , ReleaseParameters,
MemoryParameters ,and ProcessingGroupParameters, of this instance of Schedulable will be considered in the feasibility analysis of
the associated Scheduler until further notice. Whether the
resulting system is feasible or not, the addition is completed.
addToFeasibility in class Schedulerschedulable - the Schedulable entity that has
to be considered hereon in the feasibility analysis.
protected boolean removeFromFeasibility(Schedulable schedulable)
SchedulingParameters , ReleaseParameters,
MemoryParameters ,and ProcessingGroupParameters, of this instance of Schedulable
should no longer be considered in the feasibility analysis of
the associated Scheduler . Whether the resulting system is
feasible or not, the subtrac-tion is completed.
removeFromFeasibility in class Schedulerschedulable - the Schedulable entity that has
to be removed from the set of task considered for
schedulability analysis.
public boolean setIfFeasible(Schedulable schedulable,
ReleaseParameters release,
MemoryParameters memory)
setIfFeasible in class Schedulerschedulable - a Schedulable valuerelease - a ReleaseParameters valuememory - a MemoryParameters value
boolean value
public boolean setIfFeasible(Schedulable schedulable,
ReleaseParameters release,
MemoryParameters memory,
ProcessingGroupParameters group)
setIfFeasible in class Schedulerschedulable - a Schedulable valuerelease - a ReleaseParameters valuememory - a MemoryParameters valuegroup - a ProcessingGroupParameters value
public boolean setIfFeasible(Schedulable schedulable,
SchedulingParameters scheduling,
ReleaseParameters release,
MemoryParameters memory,
ProcessingGroupParameters group)
setIfFeasible in class Schedulerschedulable - a Schedulable valuescheduling - a SchedulingParameters valuerelease - a ReleaseParameters valuememory - a MemoryParameters valuegroup - a ProcessingGroupParameters value
public boolean validateSchedulingParameters(Schedulable schedulable)
validateSchedulingParameters in class Schedulerschedulable - a schedulable entity
public void notifyThreadStart(RealtimeThread thread)
notifyThreadStart in class Schedulerpublic int computeExecutionEligibility(Schedulable schedulable)
Scheduler
computeExecutionEligibility in class Schedulerschedulable - a Schedulable for which the
execution eligibility has to be computed.
int value representing the eligibility.public ReleaseParameters getDefaultReleaseParameters()
ReleaseParameters (in case null
is passed in place of ReleaseParameters to a Schedulable).
getDefaultReleaseParameters in class SchedulerReleaseParameters for this Scheduler.public SchedulingParameters getDefaultSchedulingParameters()
SchedulingParameters (in case
null is passed in place of SchedulingParameters to
a Schedulable).
getDefaultSchedulingParameters in class SchedulerSchedulingParameters for this Scheduler.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||