|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.realtime.SchedulingParameters lejos.realtime.ReleaseParameters lejos.realtime.AperiodicParameters
public class AperiodicParameters
Field Summary | |
---|---|
static String |
arrivalTimeQueueOverflowExcept
|
static String |
arrivalTimeQueueOverflowIgnore
|
static String |
arrivalTimeQueueOverflowReplace
|
static String |
arrivalTimeQueueOverflowSave
|
Constructor Summary | |
---|---|
AperiodicParameters()
Create an AperiodicParameters object. |
|
AperiodicParameters(RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Create an AperiodicParameters object. |
Method Summary | |
---|---|
String |
getArrivalTimeQueueOverflowBehavior()
Gets the behavior of the arrival time queue in the event of an overflow. |
int |
getInitialArrivalTimeQueueLength()
Gets the initial number of elements the arrival time queue can hold. |
void |
setArrivalTimeQueueOverflowBehavior(String behavior)
Sets the behavior of the arrival time queue in the case where the insertion of a new element would make the queue size greater than the initial size given in this. |
void |
setDeadline(RelativeTime deadline)
Sets the deadline value. |
boolean |
setIfFeasible(RelativeTime cost,
RelativeTime deadline)
This method first performs a feasibility analysis using the new cost, and deadline as replacements for the matching attributes of this. |
void |
setInitialArrivalTimeQueueLength(int initial)
Sets the initial number of elements the arrival time queue can hold without lengthening the queue. |
Methods inherited from class lejos.realtime.ReleaseParameters |
---|
clone, getCost, getCostOverrunHandler, getDeadline, getDeadlineMissHandler, setCost, setCostOverrunHandler, setDeadlineMissHandler |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String arrivalTimeQueueOverflowExcept
public static final String arrivalTimeQueueOverflowIgnore
public static final String arrivalTimeQueueOverflowReplace
public static final String arrivalTimeQueueOverflowSave
Constructor Detail |
---|
public AperiodicParameters()
public AperiodicParameters(RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
cost
- Processing time per invocation. On implementations which can
measure the amount of time a schedulable object is executed,
this value is the maximum amount of time a schedulable object
receives. On implementations which cannot measure execution
time, this value is used as a hint to the feasibility
algorithm. On such systems it is not possible to determine when
any particular object exceeds cost. If null, the default value
is a new instance of RelativeTime(0,0).deadline
- The latest permissible completion time measured from the
release time of the associated invocation of the schedulable
object. If null, the default value is a new instance of
RelativeTime(Long.MAX_VALUE, 999999).overrunHandler
- This handler is invoked if an invocation of the schedulable
object exceeds cost. Not required for minimum implementation.
If null, the default value is no overrun handler.missHandler
- This handler is invoked if the run() method of the schedulable
object is still executing after the deadline has passed.
Although minimum implementations do not consider deadlines in
feasibility calculations, they must recognize variable
deadlines and invoke the miss handler as appropriate. If null,
the default value is no miss handler.
IllegalArgumentException
- Thrown if the time value of cost is less than zero, or the
time value of deadline is less than or equal to zero.
IllegalAssignmentError
- Thrown if cost, deadline, overrunHandler or missHandler cannot
be stored in this.Method Detail |
---|
public String getArrivalTimeQueueOverflowBehavior()
public int getInitialArrivalTimeQueueLength()
public void setDeadline(RelativeTime deadline)
setDeadline
in class ReleaseParameters
deadline
- The latest permissible completion time measured from the
release time of the associated invocation of the schedulable
object. If deadline is null, the deadline is set to a new
instance of RelativeTime(Long.MAX_VALUE, 999999).
IllegalArgumentException
- Thrown if the time value of deadline is less than or equal to
zero, or if the new value of this deadline is incompatible with
the scheduler for any associated schedulable object.
IllegalAssignmentError
- Thrown if deadline cannot be stored in this.public void setArrivalTimeQueueOverflowBehavior(String behavior)
behavior
- A string representing the behavior.
IllegalArgumentException
- Thrown if behavior is not one of the final queue overflow
behavior values defined in this class.
Since: 1.0.1 Moved here from SporadicParameters.public boolean setIfFeasible(RelativeTime cost, RelativeTime deadline)
setIfFeasible
in class ReleaseParameters
cost
- The proposed cost. to determine when any particular object
exceeds cost. If null, the default value is a new instance of
RelativeTime(0,0).deadline
- The proposed deadline. If null, the default value is a new
instance of RelativeTime(Long.MAX_VALUE, 999999).
IllegalArgumentException
- Thrown if the time value of cost is less than zero, or the time
value of deadline is less than or equal to zero, or the values
are incompatible with the scheduler for any of the schedulable
objects which are presently using this parameter object.
IllegalAssignmentError
- Thrown if cost or deadline cannot be stored in this.public void setInitialArrivalTimeQueueLength(int initial)
initial
- The initial length of the queue.
IllegalArgumentException
- Thrown if initial is less than zero.
Since: 1.0.1 Moved here from SporadicParameters.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |