|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.ReleaseParameters
javax.realtime.AperiodicParameters
This release parameter object characterizes a Schedulable
object that may become active at any time. When a reference to a
AperiodicParameters
object is given as a parameter to a
constructor the AperiodicParameters
object becomes
bound to the object being created. Changes to the values in the
AperiodicParameters
object affect the constructed
object. If given to more than one constructor then changes to the
values in the AperiodicParameters
object affect all of the
associated objects. Note that this is a one-to-many relationship
and not a many-to-many.
Field Summary | |
static 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 .If thearrival time is a result of a
happening to which the instance of AsyncEventHandler is
bound then the arrival time is ignored. |
static 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 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 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. |
Fields inherited from class javax.realtime.ReleaseParameters |
cost, deadline, missHandler, overrunHandler |
Constructor Summary | |
AperiodicParameters()
Construct a new AperiodicParameters object. |
|
AperiodicParameters(RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Creates a new AperiodicParameters instance. |
Method Summary | |
String |
getArrivalTimeQueueOverflowBehavior()
Get the behavior of the arrival time queue in the event of an overflow. |
int |
getInitialArrivalTimeQueueLength()
Get the initial number of elements the arrival time queue can hold. |
void |
setArrivalTimeQueueOverflowBehavior(String behavior)
Set 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. |
void |
setDeadline(RelativeTime deadline)
Set the deadline for this AperiodicParameters . |
boolean |
setIfFeasible(RelativeTime cost,
RelativeTime deadline)
Attempt to change the cost and deadline. |
void |
setInitialArrivalTimeQueueLength(int initial)
Set the initial number of elements the arrival time queue can hold without lengthening the queue. |
Methods inherited from class javax.realtime.ReleaseParameters |
clone, getCost, getCostOverrunHandler, getDeadline, getDeadlineMissHandler, setCost, setCostOverrunHandler, setDeadlineMissHandler |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String arrivalTimeQueueOverflowExcept
ResourceLimitError
.If thearrival time is a result of a
happening to which the instance of AsyncEventHandler
is
bound then the arrival time is ignored.
public static final String arrivalTimeQueueOverflowIgnore
public static final String arrivalTimeQueueOverflowReplace
public static final String arrivalTimeQueueOverflowSave
Constructor Detail |
public AperiodicParameters()
AperiodicParameters
object.
This constructor is equivalent to this(null, null,
null, null)
.
public AperiodicParameters(RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
AperiodicParameters
instance.
cost
- Processing time per period. 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 period. 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 or will exceed cost time units in a period. 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
period. Other implementations may use this parameter to
compute execution eligibility. If null, deadline will equal the
period.overrunHandler
- This handler is invoked if an invocation
of the Schedulable
object exceeds cost in the given
period. Not required for minimum implementation. If null,
nothing happens on the overrun condition.missHandler
- This handler is invoked if the Runnable.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 |
public boolean setIfFeasible(RelativeTime cost, RelativeTime deadline)
setIfFeasible
in class ReleaseParameters
cost
- The proposed cost. If zero, no change is made.deadline
- The proposed deadline. If zero, no change is
made.
IllegalArgumentException
- if cost
is less
than zero, or if deadline
is less than or equal to
zero
IllegalAssignmentError
- if one or more of the arguments
cannot be referred to by this
; in this case, no
changes are made, even for those parameters that can be stored
in this
public String getArrivalTimeQueueOverflowBehavior()
String
representing the behaviour
currently set.public void setArrivalTimeQueueOverflowBehavior(String behavior)
behavior
- a string representing the desired behavior.public int getInitialArrivalTimeQueueLength()
public void setInitialArrivalTimeQueueLength(int initial)
initial
- the initial length of the queue.
IllegalArgumentException
- if initial
is
less than zeropublic void setDeadline(RelativeTime deadline)
AperiodicParameters
.
setDeadline
in class ReleaseParameters
deadline
- the deadline
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |