javax.realtime
Class ProcessingGroupParameters

java.lang.Object
  extended byjavax.realtime.ProcessingGroupParameters

public class ProcessingGroupParameters
extends Object

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.

Author:
Angelo Corsaro

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

start

protected HighResolutionTime start

period

protected RelativeTime period

cost

protected RelativeTime cost

deadline

protected RelativeTime deadline

overrunHandler

protected AsyncEventHandler overrunHandler

missHandler

protected AsyncEventHandler missHandler
Constructor Detail

ProcessingGroupParameters

public ProcessingGroupParameters(HighResolutionTime start,
                                 RelativeTime period,
                                 RelativeTime cost,
                                 RelativeTime deadline,
                                 AsyncEventHandler overrunHandler,
                                 AsyncEventHandler missHandler)
Creates a new ProcessingGroupParameters instance.

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 RelativeTime getCost()
Get the cost value.

Returns:
a RelativeTime value representing the cost.

setCost

public void setCost(RelativeTime cost)
Set the cost value.

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

getCostOverrunHandler

public AsyncEventHandler getCostOverrunHandler()
Get the cost overrun handler.

Returns:
An AsyncEventHandler object that is cost overrun handler of this.

setCostOverrunHandler

public void setCostOverrunHandler(AsyncEventHandler handler)
Set the cost overrun handler.

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

getDeadline

public RelativeTime getDeadline()
Get the deadline.

Returns:
a RelativeTime value that represent the deadline.

setDeadline

public void setDeadline(RelativeTime deadline)
Set the deadline.

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

getDeadlineMissHandler

public AsyncEventHandler getDeadlineMissHandler()
Get the deadline miss handler.

Returns:
the AsyncEventHandler object that is deadline miss handler of this.

setDeadlineMissHandler

public void setDeadlineMissHandler(AsyncEventHandler handler)
Set the deadline miss handler.

Parameters:
handler - This handler is invoked if the run() method of the schedulable object is still executing after the deadline has passed.

getPeriod

public RelativeTime getPeriod()
Get the period.

Returns:
Interval used to enforce allocation of processing resources to the associated schedulable objects. Also used in the feasibility analysis and admission control algorithms.

setPeriod

public void setPeriod(RelativeTime period)
Set the period.

Parameters:
period - Interval used to enforce allocation of processing resources to the associated schedulable objects. Also used in the feasibility analysis and admission control algorithms.

getStart

public HighResolutionTime getStart()
Get the start time.

Returns:
a HighResolutionTime value that represent the start time.

setStart

public void setStart(HighResolutionTime start)
Set the start time.

Parameters:
start - Time at which the first period begins

setIfFeasible

public boolean setIfFeasible(RelativeTime period,
                             RelativeTime cost,
                             RelativeTime deadline)


jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2005 Angelo Corsaro and Morgan Deters.