|
|||||||||
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 fiven 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 | |
(package private) javax.realtime.RelativeTime |
cost
|
(package private) javax.realtime.RelativeTime |
deadline
|
(package private) javax.realtime.AsyncEventHandler |
missHandler
|
(package private) javax.realtime.AsyncEventHandler |
overrunHandler
|
(package private) javax.realtime.RelativeTime |
period
|
(package private) java.util.LinkedList |
schList
|
(package private) javax.realtime.HighResolutionTime |
start
|
Constructor Summary | |
ProcessingGroupParameters(javax.realtime.HighResolutionTime start,
javax.realtime.RelativeTime period,
javax.realtime.RelativeTime cost,
javax.realtime.RelativeTime deadline,
javax.realtime.AsyncEventHandler overrunHandler,
javax.realtime.AsyncEventHandler missHandler)
Create a ProcessingGroupParameters objects. |
Method Summary | |
boolean |
bindSchedulable(javax.realtime.Schedulable sch)
Informs this that there is one more instance of Schedulable
that uses this as its ReleaseParameters . |
javax.realtime.RelativeTime |
getCost()
Gets the value of cost . |
javax.realtime.AsyncEventHandler |
getCostOverrunHandler()
Get the cost overrun handler. |
javax.realtime.RelativeTime |
getDeadline()
Gets the value of deadline . |
javax.realtime.AsyncEventHandler |
getDeadlineMissHandler()
Gets the deadline missed handler. |
javax.realtime.RelativeTime |
getPeriod()
Gets the value of period . |
javax.realtime.HighResolutionTime |
getStart()
Gets the value of start . |
void |
setCost(javax.realtime.RelativeTime cost)
Sets the value of cost . |
void |
setCostOverrunHandler(javax.realtime.AsyncEventHandler handler)
Sets the cost overrun handler. |
void |
setDeadline(javax.realtime.RelativeTime deadline)
Sets the value of deadline . |
void |
setDeadlineMissHandler(javax.realtime.AsyncEventHandler handler)
Sets the deadline miss handler. |
boolean |
setIfFeasible(javax.realtime.RelativeTime period,
javax.realtime.RelativeTime cost,
javax.realtime.RelativeTime deadline)
This method appears in many classes in the RTSJ and with various parameters. |
void |
setPeriod(javax.realtime.RelativeTime period)
Sets the value of period . |
void |
setStart(javax.realtime.HighResolutionTime start)
Sets the value of start . |
boolean |
unbindSchedulable(javax.realtime.Schedulable sch)
Informs this that Schedulable sch
that uses this as its ReleaseParameters . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
javax.realtime.HighResolutionTime start
javax.realtime.RelativeTime period
javax.realtime.RelativeTime cost
javax.realtime.RelativeTime deadline
javax.realtime.AsyncEventHandler overrunHandler
javax.realtime.AsyncEventHandler missHandler
java.util.LinkedList schList
Constructor Detail |
public ProcessingGroupParameters(javax.realtime.HighResolutionTime start, javax.realtime.RelativeTime period, javax.realtime.RelativeTime cost, javax.realtime.RelativeTime deadline, javax.realtime.AsyncEventHandler overrunHandler, javax.realtime.AsyncEventHandler missHandler)
ProcessingGroupParameters
objects.
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 javax.realtime.RelativeTime getCost()
cost
.
cost
.public javax.realtime.AsyncEventHandler getCostOverrunHandler()
AsyncEventHandler
that is cost overrun handler of this
.public javax.realtime.RelativeTime getDeadline()
deadline
.
RelativeTime
that
is the deadline of this
.public javax.realtime.AsyncEventHandler getDeadlineMissHandler()
AsynchEventHandler
that is deadline miss handler of this
.public javax.realtime.RelativeTime getPeriod()
period
.
RelativeTime
that
represents the value of period
.public javax.realtime.HighResolutionTime getStart()
start
.
HighResolutionTime
that represents the value of start
.public void setCost(javax.realtime.RelativeTime cost)
cost
.
cost
- The new value for cost
.public void setCostOverrunHandler(javax.realtime.AsyncEventHandler handler)
handler
- This handler is invoked if the run()
method of any of the schedulable objects attempt to
execute for more than cost
time units
in any period.public void setDeadline(javax.realtime.RelativeTime deadline)
deadline
.
deadline
- The new value for deadline
.public void setDeadlineMissHandler(javax.realtime.AsyncEventHandler handler)
handler
- This handler is invoked if the run()
method of any of the schedulable objects still
expect to execute after the deadline has passed.public void setPeriod(javax.realtime.RelativeTime period)
period
.
period
- The new value for period
.public void setStart(javax.realtime.HighResolutionTime start)
start
.
start
- The new value for start
.public boolean setIfFeasible(javax.realtime.RelativeTime period, javax.realtime.RelativeTime cost, javax.realtime.RelativeTime deadline)
Schedulable
or an instance of Schedulable
. The
method first performs a feasibility analysis using the new scheudling
characteristics as replacements for the matching scheduling characteristics
of either this
or the given instance of Schedulable
as appropriate, with the new scheduling characteristics.
period
- The proposed period.cost
- The proposed cost.deadline
- The proposed deadline.
public boolean bindSchedulable(javax.realtime.Schedulable sch)
this
that there is one more instance of Schedulable
that uses this
as its ReleaseParameters
.
public boolean unbindSchedulable(javax.realtime.Schedulable sch)
this
that Schedulable sch
that uses this
as its ReleaseParameters
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |