javax.realtime
Class SporadicParameters

java.lang.Object
  |
  +--javax.realtime.ReleaseParameters
        |
        +--javax.realtime.AperiodicParameters
              |
              +--javax.realtime.SporadicParameters

public class SporadicParameters
extends AperiodicParameters

A notice to the scheduler that the associated schedulable object's run method will be released aperiodically but with a minimum time between releases. When a reference to a SporadicParameters object is given as a parameter to a constructor, the SporadicParameters object becomes bound to the object being created. Changes to the values in the SporadicParameters object affect the constructed object. If given to more than one constructor, then changes to the values in the SporadicParameters 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.


Field Summary
static java.lang.String arrivalTimeQueueOverflowExcept
           
static java.lang.String arrivalTimeQueueOverflowIgnore
           
static java.lang.String arrivalTimeQueueOverflowReplace
           
static java.lang.String arrivalTimeQueueOverflowSave
           
static java.lang.String mitViolationExcept
           
static java.lang.String mitViolationIgnore
           
static java.lang.String mitViolationReplace
           
static java.lang.String mitViolationSave
           
 
Fields inherited from class javax.realtime.ReleaseParameters
cost, deadline, missHandler, overrunHandler, schedSet
 
Constructor Summary
SporadicParameters(RelativeTime minInterarrival, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
          Create a SporadicParameters object.
 
Method Summary
 java.lang.String getArrivalTimeQueueOverflowBehavior()
           
 int getInitialArrivalTimeQueueLength()
           
 RelativeTime getMinimumInterarrival()
          Get the minimum interarrival time.
 java.lang.String getMitViolationBehavior()
           
 void setArrivalTimeQueueOverflowBehavior(java.lang.String behavior)
           
 boolean setIfFeasible(RelativeTime interarrival, RelativeTime cost, RelativeTime deadline)
           
 void setInitialArrivalTimeQueueLength(int initial)
           
 void setMinimumInterarrival(RelativeTime minimum)
          Set the minimum interarrival time.
 void setMitViolationBehavior(java.lang.String behavior)
           
 
Methods inherited from class javax.realtime.ReleaseParameters
getCost, getCostOverrunHandler, getDeadline, getDeadlineMissHandler, setCost, setCostOverrunHandler, setDeadline, setDeadlineMissHandler, setIfFeasible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arrivalTimeQueueOverflowExcept

public static final java.lang.String arrivalTimeQueueOverflowExcept

arrivalTimeQueueOverflowIgnore

public static final java.lang.String arrivalTimeQueueOverflowIgnore

arrivalTimeQueueOverflowReplace

public static final java.lang.String arrivalTimeQueueOverflowReplace

arrivalTimeQueueOverflowSave

public static final java.lang.String arrivalTimeQueueOverflowSave

mitViolationExcept

public static final java.lang.String mitViolationExcept

mitViolationIgnore

public static final java.lang.String mitViolationIgnore

mitViolationReplace

public static final java.lang.String mitViolationReplace

mitViolationSave

public static final java.lang.String mitViolationSave
Constructor Detail

SporadicParameters

public SporadicParameters(RelativeTime minInterarrival,
                          RelativeTime cost,
                          RelativeTime deadline,
                          AsyncEventHandler overrunHandler,
                          AsyncEventHandler missHandler)
Create a SporadicParameters object.
Parameters:
minInterarrival - The release times of the schedulable object will occur no closer than this interval. Must be greater than zero when entering feasibility analysis.
cost - Processing time per minimum interarrival interval. On implementations which can measure the amount of time a schedulable object is executed, this value is the maximum amount of time a schedulable object receives per interval. On implementations which cannot measure execution time, this value is used as a hint to the feasibility algorithm. On such systems it is not possible to determine when any particular object exceeds cost. Equivalent to RelativeTime(0,0) if null.
deadline - The latest permissible completion time measured from the release time of the associated invocation of the schedulable object. For a minimum implementation for purposes of feasibility analysis, the deadline is equal to the minimum interarrival interval. Other implementations may use this parameter to compute execution eligibility. If null, deadline will equal the minimum interarrival time.
overrunHandler - This handler is invoked if an invocation of the schedulable object exceeds cost. Not required for minimum implementation. If null, nothing happens on the overrun condition.
missHandler - This handler is invoked if the run() method of the schedulable object is still executing after the deadline has passed. Although minimum implementations do not consider deadlines in feasibility calculations, they must recognize variable deadlines and invoke the miss handler as appropriate. If null, nothing happens on the miss deadline condition.
Method Detail

setIfFeasible

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

getMinimumInterarrival

public RelativeTime getMinimumInterarrival()
Get the minimum interarrival time.

setMinimumInterarrival

public void setMinimumInterarrival(RelativeTime minimum)
Set the minimum interarrival time.
Parameters:
minimum - The release times of the schedulable object will occur no closer than this interval. Must be greater than zero when entering feasibility analysis.

getArrivalTimeQueueOverflowBehavior

public java.lang.String getArrivalTimeQueueOverflowBehavior()

getInitialArrivalTimeQueueLength

public int getInitialArrivalTimeQueueLength()

getMitViolationBehavior

public java.lang.String getMitViolationBehavior()

setArrivalTimeQueueOverflowBehavior

public void setArrivalTimeQueueOverflowBehavior(java.lang.String behavior)

setInitialArrivalTimeQueueLength

public void setInitialArrivalTimeQueueLength(int initial)

setMitViolationBehavior

public void setMitViolationBehavior(java.lang.String behavior)