|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.realtime.SchedulingParameters
lejos.realtime.ReleaseParameters
public class ReleaseParameters
This ReleaseParameters
class is an equivalent of the
ReleaseParameters
class in RTSJ.
Constructor Summary | |
---|---|
ReleaseParameters()
Create a new instance of ReleaseParameters. |
|
ReleaseParameters(RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Create a new instance of ReleaseParameters with the given parameter values. |
Method Summary | |
---|---|
Object |
clone()
Return a clone of this. |
RelativeTime |
getCost()
|
AsyncEventHandler |
getCostOverrunHandler()
|
RelativeTime |
getDeadline()
|
AsyncEventHandler |
getDeadlineMissHandler()
|
void |
setCost(RelativeTime cost)
|
void |
setCostOverrunHandler(AsyncEventHandler overrunHandler)
|
void |
setDeadline(RelativeTime deadline)
|
void |
setDeadlineMissHandler(AsyncEventHandler missHandler)
|
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 all schedulable objects associated with this release parameters object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReleaseParameters()
public ReleaseParameters(RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
cost
- Processing time units per release. 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 per release.
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.
There is no default for deadline in this class. The default must be
determined by the subclasses.overrunHandler
- This handler is invoked if an invocation of the schedulable
object exceeds cost. In the minimum implementation overrunHandler is
ignored. If null, no application event handler is executed on cost
overrun.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, no application event handler is
executed on the miss deadline condition.
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 Object clone()
public RelativeTime getCost()
public void setCost(RelativeTime cost)
public RelativeTime getDeadline()
public void setDeadline(RelativeTime deadline)
public AsyncEventHandler getDeadlineMissHandler()
public void setDeadlineMissHandler(AsyncEventHandler missHandler)
public AsyncEventHandler getCostOverrunHandler()
public void setCostOverrunHandler(AsyncEventHandler overrunHandler)
public boolean setIfFeasible(RelativeTime cost, RelativeTime deadline)
cost
- The proposed cost. Equivalent to RelativeTime(0,0) if null.
(A new instance of RelativeTime is created in the memory area containing
this ReleaseParameters instance). If null, the default value is a new
instance of RelativeTime(0,0).deadline
- The proposed deadline. If null, the default value is new
instance of RelativeTime(period).
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |