lejos.realtime
Class DMScheduler
java.lang.Object
lejos.realtime.Scheduler
lejos.realtime.PriorityScheduler
lejos.realtime.DMScheduler
public class DMScheduler
- extends PriorityScheduler
- Author:
- Team iRboT
Method Summary |
static PriorityScheduler |
instance()
Return a reference to the distinguished instance of PriorityScheduler
which is the system's base scheduler. |
boolean |
isFeasible()
Queries this scheduler about the feasibility of the set of schedulable
objects currently in the feasibility set. |
Methods inherited from class lejos.realtime.PriorityScheduler |
fireSchedulable, getMaxPriority, getMaxPriority, getMinPriority, getMinPriority, getNormPriority, getNormPriority, getPolicyName, setIfFeasible, setIfFeasible, setIfFeasible |
instance
public static PriorityScheduler instance()
- Return a reference to the distinguished instance of PriorityScheduler
which is the system's base scheduler.
- Returns:
- A reference to the distinguished instance PriorityScheduler.
isFeasible
public boolean isFeasible()
- Description copied from class:
PriorityScheduler
- Queries this scheduler about the feasibility of the set of schedulable
objects currently in the feasibility set.
Implementation Notes:
The default feasibility test for the PriorityScheduler considers a set of
schedulable objects with bounded resource requirements, to always be
feasible. This covers all schedulable objects with release parameters of
types PeriodicParameters and SporadicParameters.
If any schedulable object within the feasibility set has release
parameters of the exact type AperiodicParameters (not a subclass
thereof), then the feasibility set is not feasible, as aperiodic release
characteristics require unbounded resources. In that case, this method
will return false and all methods in the setIfFeasible family of methods
will also return false. Consequently, any call to a setIfFeasible method
that passes a schedulable object which has release parameters of type
AperiodicParameters, or passes proposed release parameters of type
AperiodicParameters, will return false. The only time a setIfFeasible
method can return true, when there exists in the feasibility set a
schedulable object with release parameters of type AperiodicParameters,
is when the method will change those release parameters to not be
AperiodicParameters.
Implementations may provide a feasibility test other than the default
test just described. In which case the details of that test should be
documented here in place of this description of the default
implementation.
Specified by:
isFeasible in class @see Scheduler
- Overrides:
isFeasible
in class PriorityScheduler
- Returns:
- True, if the system is feasible. False, if not.