|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.realtime.ProcessingGroupParameters
This is associated with one or more schedulable objects for which the system guarantees that the associated
objects will not be given more time per period than indicated by cost.
For all threads with a reference to an instance of ProcessingGroupParameters
p and a reference to
an instance of AperiodicParameters
no more than p.cost will be allocated to the execution of
these threads in each interval of time given by p.period after the time indicated by p.start.
When a reference to a ProcessingGroupParameters
object is given
as a parameter to a constructor the ProcessingGroupParameters
object becomes bound
to the object being created. Changes to the values in the ProcessingGroupParameters
object affect the constructed object. If given to more than one constructor,
then changes to the values in the ProcessingGroupParameters
object affect all
of the associated objects. Note that this is a one-to-many relationship and
not a many-to-many.
Caution: This class is explicitly unsafe in multithreaded situations when it is being changed. No synchronization is done. It is assumed that users of this class who are mutating instances will be doing their own synchronization at a higher level.
Caution: The cost
parameter time should be considered to be
measured against the target platform.
Constructor Summary | |
ProcessingGroupParameters(HighResolutionTime start,
RelativeTime period,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Create a ProcessingGroupParameters object. |
Method Summary | |
RelativeTime |
getCost()
Get the cost value. |
AsyncEventHandler |
getCostOverrunHandler()
Get the cost overrun handler. |
RelativeTime |
getDeadline()
Get the deadline value. |
AsyncEventHandler |
getDeadlineMissHandler()
Get the deadline missed handler. |
RelativeTime |
getPeriod()
Get the period. |
HighResolutionTime |
getStart()
Get the start time. |
void |
setCost(RelativeTime cost)
Set the cost value. |
void |
setCostOverrunHandler(AsyncEventHandler handler)
Set the cost overrun handler. |
void |
setDeadline(RelativeTime deadline)
Set the deadline value. |
void |
setDeadlineMissHandler(AsyncEventHandler handler)
Set the deadline miss handler. |
boolean |
setIfFeasible(RelativeTime period,
RelativeTime cost,
RelativeTime deadline)
Returns true if, after considering the values of the parameters, the task set would still be feasible. |
void |
setPeriod(RelativeTime period)
Set the period. |
void |
setStart(HighResolutionTime start)
Set the start time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProcessingGroupParameters(HighResolutionTime start, RelativeTime period, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
ProcessingGroupParameters
object.start
- Time at which the first period begins.period
- The period is the interval between successive
unblocks of waitForNextPeriod()
.cost
- Processing time per period.deadline
- The latest permissible completion time measured from the start of the current period.
Changing the deadline might not take effect after the expiration
of the current deadline.overrunHandler
- This handler is invoked if the run()
method of the schedulable
object of the previous period is still executing at the start
of the current period.missHandler
- This handler is invoked if the run()
method of the schedulable
object is still executing after the deadline has passed.Method Detail |
public boolean setIfFeasible(RelativeTime period, RelativeTime cost, RelativeTime deadline)
public RelativeTime getCost()
public AsyncEventHandler getCostOverrunHandler()
AsyncEventHandler
object that is cost overrun handler of this.public RelativeTime getDeadline()
RelativeTime
object that represents the deadline of this.public AsyncEventHandler getDeadlineMissHandler()
AsyncEventHandler
object that is deadline miss handler of this.public RelativeTime getPeriod()
RelativeTime
object that represents the period of time of this.public HighResolutionTime getStart()
HighResolutionTime
object that represents the start time of this.public void setCost(RelativeTime cost)
cost
- The schedulable objects with a reference to this receive cumulatively
no more than cost time per period on implementations that can collect execution time
per thread.public void setCostOverrunHandler(AsyncEventHandler handler)
handler
- This handler is invoked if the run()
method of the schedulable
object of the previous period is still executing at the start of the current period.public void setDeadline(RelativeTime deadline)
deadline
- The latest permissible completion time measured from the start of the current period.
Not used in a minimum implementation. Other implementations may use this parameter
to compute execution eligibility. The default value is the same as period
.public void setDeadlineMissHandler(AsyncEventHandler handler)
handler
- This handler is invoked if the run()
method of the schedulable
object is still executing after the deadline has passed.public void setPeriod(RelativeTime period)
period
- Interval used to enforce allocation of processing resources to the
associated schedulable objects. Also used in the feasibility analysis
and admission control algorithms.public void setStart(HighResolutionTime start)
start
- Time at which the first period begins.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |