javax.realtime
Class ProcessingGroupParameters

java.lang.Object
  |
  +--javax.realtime.ProcessingGroupParameters

public class ProcessingGroupParameters
extends java.lang.Object

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

start

javax.realtime.HighResolutionTime start

period

javax.realtime.RelativeTime period

cost

javax.realtime.RelativeTime cost

deadline

javax.realtime.RelativeTime deadline

overrunHandler

javax.realtime.AsyncEventHandler overrunHandler

missHandler

javax.realtime.AsyncEventHandler missHandler

schList

java.util.LinkedList schList
Constructor Detail

ProcessingGroupParameters

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)
Create a ProcessingGroupParameters objects.

Parameters:
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

getCost

public javax.realtime.RelativeTime getCost()
Gets the value of cost.

Returns:
The value of cost.

getCostOverrunHandler

public javax.realtime.AsyncEventHandler getCostOverrunHandler()
Get the cost overrun handler.

Returns:
A reference to an instance of AsyncEventHandler that is cost overrun handler of this.

getDeadline

public javax.realtime.RelativeTime getDeadline()
Gets the value of deadline.

Returns:
A reference to an instance of RelativeTime that is the deadline of this.

getDeadlineMissHandler

public javax.realtime.AsyncEventHandler getDeadlineMissHandler()
Gets the deadline missed handler.

Returns:
A reference to an instance of AsynchEventHandler that is deadline miss handler of this.

getPeriod

public javax.realtime.RelativeTime getPeriod()
Gets the value of period.

Returns:
A reference of an instance of RelativeTime that represents the value of period.

getStart

public javax.realtime.HighResolutionTime getStart()
Gets the value of start.

Returns:
A reference to an instance of HighResolutionTime that represents the value of start.

setCost

public void setCost(javax.realtime.RelativeTime cost)
Sets the value of cost.

Parameters:
cost - The new value for cost.

setCostOverrunHandler

public void setCostOverrunHandler(javax.realtime.AsyncEventHandler handler)
Sets the cost overrun handler.

Parameters:
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.

setDeadline

public void setDeadline(javax.realtime.RelativeTime deadline)
Sets the value of deadline.

Parameters:
deadline - The new value for deadline.

setDeadlineMissHandler

public void setDeadlineMissHandler(javax.realtime.AsyncEventHandler handler)
Sets the deadline miss handler.

Parameters:
handler - This handler is invoked if the run() method of any of the schedulable objects still expect to execute after the deadline has passed.

setPeriod

public void setPeriod(javax.realtime.RelativeTime period)
Sets the value of period.

Parameters:
period - The new value for period.

setStart

public void setStart(javax.realtime.HighResolutionTime start)
Sets the value of start.

Parameters:
start - The new value for start.

setIfFeasible

public 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. The parameters are either new scheduling characteristics for an instance 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.

Parameters:
period - The proposed period.
cost - The proposed cost.
deadline - The proposed deadline.
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.

bindSchedulable

public boolean bindSchedulable(javax.realtime.Schedulable sch)
Informs this that there is one more instance of Schedulable that uses this as its ReleaseParameters.


unbindSchedulable

public boolean unbindSchedulable(javax.realtime.Schedulable sch)
Informs this that Schedulable sch that uses this as its ReleaseParameters.