|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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.
Field Summary | |
protected RelativeTime |
cost
|
protected RelativeTime |
deadline
|
protected AsyncEventHandler |
missHandler
|
protected AsyncEventHandler |
overrunHandler
|
protected RelativeTime |
period
|
protected HighResolutionTime |
start
|
Constructor Summary | |
ProcessingGroupParameters(HighResolutionTime start,
RelativeTime period,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Creates a new ProcessingGroupParameters instance. |
Method Summary | |
RelativeTime |
getCost()
Get the cost value. |
AsyncEventHandler |
getCostOverrunHandler()
Get the cost overrun handler. |
RelativeTime |
getDeadline()
Get the deadline. |
AsyncEventHandler |
getDeadlineMissHandler()
Get the deadline miss 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. |
void |
setDeadlineMissHandler(AsyncEventHandler handler)
Set the deadline miss handler. |
boolean |
setIfFeasible(RelativeTime period,
RelativeTime cost,
RelativeTime deadline)
|
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 |
Field Detail |
protected HighResolutionTime start
protected RelativeTime period
protected RelativeTime cost
protected RelativeTime deadline
protected AsyncEventHandler overrunHandler
protected AsyncEventHandler missHandler
Constructor Detail |
public ProcessingGroupParameters(HighResolutionTime start, RelativeTime period, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
ProcessingGroupParameters
instance.
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 RelativeTime getCost()
RelativeTime
value representing the
cost.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 AsyncEventHandler getCostOverrunHandler()
AsyncEventHandler
object that is cost
overrun handler of this.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 RelativeTime getDeadline()
RelativeTime
value that represent the deadline.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 AsyncEventHandler getDeadlineMissHandler()
AsyncEventHandler
object that is deadline
miss handler of this.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 RelativeTime getPeriod()
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 HighResolutionTime getStart()
HighResolutionTime
value that represent
the start time.public void setStart(HighResolutionTime start)
start
- Time at which the first period beginspublic boolean setIfFeasible(RelativeTime period, RelativeTime cost, RelativeTime deadline)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |