|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.ReleaseParameters
javax.realtime.AperiodicParameters
javax.realtime.SporadicParameters
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 will 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.
Correct initiation of the deadline miss and cost overrun handlers requires that
the underlying system know the arrival time of each sporadic task. For an instance of
RealtimeThread
the arrival time is the time at which the
start()
is invoked. For
other instances of
Schedulable
it may be required for the implementation to save the
arrival times. For instances of
AsynchEventHandler
with a
ReleaseParameters
type of
SporadicParameters
the
implementation must maintain a queue of monotonically increasing
arrival times which correspond to the execution of the fire()
method of the instance of
AsynchEvent
bound to the instance of
AsynchEventHandler
.
This class allows the application to specify one of four possible behaviors that indicate what to do if an arrival occurs that is closer in time to the previous arrival than the value given in this class as minimum interarrival time, what to do if, for any reason, the queue overflows, and the initial size of the queue.
Field Summary | |
static java.lang.String |
arrivalTimeQueueOverflowExcept
If an arrival time occurs and should be queued but the queue already holds a number of times equal to the initial queue length defined by this then the fire() method shall throw a
ResourceLimitError . |
static java.lang.String |
arrivalTimeQueueOverflowIgnore
If an arrival time occurs and should be queued but the queue already holds a number of times equal to the initial queue length defined by this then the arrival time is ignored. |
static java.lang.String |
arrivalTimeQueueOverflowReplace
If an arrival time occurs and should be queued but the queue already holds a number of times equal to the initial queue length defined by this then the previous arrival time is overwritten by the new arrival time. |
static java.lang.String |
arrivalTimeQueueOverflowSave
If an arrival time occurs and should be queued but the queue already holds a number of times equal to the initial queue length defined by this then the queue is lengthened and the arrival time is saved. |
static java.lang.String |
mitViolationExcept
If an arrival time for any instance of Schedulable which has this as its
instance of ReleaseParameters
occurs at a time less than the minimum
interarrival time defined here then the fire() method shall throw
MITViolationException . |
static java.lang.String |
mitViolationIgnore
If an arrival time for any instance of Schedulable which as this as its instance
of ReleaseParameters
occurs at a time less than the minimum interarrival time
defined here then the new arrival time is ignored. |
static java.lang.String |
mitViolationReplace
If an arrival time for any instance of Schedulable which has this as its instance
of ReleaseParameters
occurs at a time less than the minimum interarrival time
defined here then, if necessary, the previous arrival time may be overwritten
with the new arrival time. |
static java.lang.String |
mitViolationSave
If an arrival time for any instance of Schedulable which has this as its instance
of ReleaseParameters
occurs at a time less than the minimum interarrival time
defined here then the new arrival time is adjusted so that the difference
between it and the previous time is equal to the minimum interarrival time. |
Fields inherited from class javax.realtime.ReleaseParameters |
cost, deadline, missHandler, overrunHandler |
Constructor Summary | |
SporadicParameters(RelativeTime minInterval,
RelativeTime cost)
Constructor. |
|
SporadicParameters(RelativeTime minInterarrival,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Create a SporadicParameters
object. |
Method Summary | |
int |
getArrivalTimeQueueLength()
|
RelativeTime |
getMinimumInterarrival()
|
java.lang.String |
getMitViolationBehavior()
|
void |
setArrivalTimeQueueOverflowBehavior(java.lang.String behavior)
Sets the behavior of the arrival time queue in the case where the insertion of a new element would make the queue size greater than the initial size given in this. |
boolean |
setIfFeasible(RelativeTime interarrival,
RelativeTime cost,
RelativeTime deadline)
|
void |
setInitialArrivalTimeQueueLength(int initial)
Sets the initial number of elements the arrival time queue can hold without lengthening the queue. |
void |
setMinimumInterarrival(RelativeTime minimum)
|
void |
setMitViolationBehavior(java.lang.String behavior)
|
Methods inherited from class javax.realtime.AperiodicParameters |
getArrivalTimeQueueOverflowBehavior, getInitialArrivalTimeQueueLength, setDeadline, setIfFeasible |
Methods inherited from class javax.realtime.ReleaseParameters |
getCost, getCostOverrunHandler, getDeadline, getDeadlineMissHandler, setCost, setCostOverrunHandler, setDeadlineMissHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String arrivalTimeQueueOverflowExcept
fire()
method shall throw a
ResourceLimitError
. If the arrival time is a result
of a happening to which the instance of
AsyncEventHandler
is bound then the arrival time is ignored.
public static final java.lang.String arrivalTimeQueueOverflowIgnore
public static final java.lang.String arrivalTimeQueueOverflowReplace
public static final java.lang.String arrivalTimeQueueOverflowSave
public static final java.lang.String mitViolationExcept
Schedulable
which has this as its
instance of ReleaseParameters
occurs at a time less than the minimum
interarrival time defined here then the fire()
method shall throw
MITViolationException
.
If the arrival time is a result of a happening to which
the instance of
AsyncEventHandler
is bound then the arrival time is ignored.
public static final java.lang.String mitViolationIgnore
Schedulable
which as this as its instance
of ReleaseParameters
occurs at a time less than the minimum interarrival time
defined here then the new arrival time is ignored.
public static final java.lang.String mitViolationReplace
Schedulable
which has this as its instance
of ReleaseParameters
occurs at a time less than the minimum interarrival time
defined here then, if necessary, the previous arrival time may be overwritten
with the new arrival time.
public static final java.lang.String mitViolationSave
Schedulable
which has this as its instance
of ReleaseParameters
occurs at a time less than the minimum interarrival time
defined here then the new arrival time is adjusted so that the difference
between it and the previous time is equal to the minimum interarrival time.
Constructor Detail |
public SporadicParameters(RelativeTime minInterarrival, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
SporadicParameters
object.
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 set 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.public SporadicParameters(RelativeTime minInterval, RelativeTime cost)
minInterval
- cost
- Method Detail |
public RelativeTime getMinimumInterarrival()
public java.lang.String getMitViolationBehavior()
public void setArrivalTimeQueueOverflowBehavior(java.lang.String behavior)
AperiodicParameters
setArrivalTimeQueueOverflowBehavior
in class AperiodicParameters
behavior
- the arrival time queue overflow behavior of this objectpublic boolean setIfFeasible(RelativeTime interarrival, RelativeTime cost, RelativeTime deadline)
interarrival
- cost
- deadline
-
public void setInitialArrivalTimeQueueLength(int initial)
AperiodicParameters
setInitialArrivalTimeQueueLength
in class AperiodicParameters
initial
- public void setMinimumInterarrival(RelativeTime minimum)
minimum
- public void setMitViolationBehavior(java.lang.String behavior)
behavior
- public int getArrivalTimeQueueLength()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |