|
![]() |
|||||||||
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
public class SporadicParameters
Jamaica Real-Time Specification for Java class SporadicParameters.
This class characterizes the release of schedulable objects that can be released at any time but with a minimum time between two releases. Unlike AperiodicParameters, SporadicParameters does not necessarily make the feasibility analysis of a set of schedulable objects impossible.
Note that any changes to RelativeTime arguments of this object do not propagate to the schedulable object until the corresponding setter method of AperiodicParameters is called to notify this object about the change.
NOTE: the methods in this class are not synchronized. They cannot be used by several threads simultaneously without proper explicit synchronization.
Field Summary | |
---|---|
static String |
mitViolationExcept
The "EXCEPT" policy for dealing with minimum arrival time violations. |
static String |
mitViolationIgnore
The "IGNORE" policy for dealing with minimum arrival time violations. |
static String |
mitViolationReplace
The "REPLACE" policy for dealing with minimum arrival time violations. |
static String |
mitViolationSave
The "SAVE" policy for dealing with minimum arrival time violations. |
Fields inherited from class javax.realtime.AperiodicParameters |
---|
arrivalTimeQueueOverflowExcept, arrivalTimeQueueOverflowIgnore, arrivalTimeQueueOverflowReplace, arrivalTimeQueueOverflowSave |
Constructor Summary | |
---|---|
SporadicParameters(RelativeTime interarrival)
Create a SporadicParameters object. |
|
SporadicParameters(RelativeTime interarrival,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Constructor of SporadicParameters to be used as ReleaseParameters for AbstractAsyncEventHandler if the event handler will be scheduled aperiodically with a miminum interarrival time between each two releases. |
Method Summary | |
---|---|
Object |
clone()
clone creates a clone of this object with the same parameters but without association to any schedulable object. |
RelativeTime |
getMinimumInterarrival()
getMinimumInterarrival returns the minimum interarrival time. |
String |
getMitViolationBehavior()
getMitViolationBehavior returns the current setting of the policy for dealing with minimum arrival time violations. |
boolean |
setIfFeasible(RelativeTime interarrival,
RelativeTime cost,
RelativeTime deadline)
setIfFeasible performs a feasibility analysis using the new period, cost and deadline parameters. |
void |
setMinimumInterarrival(RelativeTime interarrival)
setMinimumInterarrival sets the minimum interarrival time to a new value, independent on the impact this will have on the feasibility of the system. |
void |
setMitViolationBehavior(String behavior)
setMitViolationBehavior sets the policy for dealing with minimum arrival time violations. |
Methods inherited from class javax.realtime.AperiodicParameters |
---|
getArrivalTimeQueueOverflowBehavior, getInitialArrivalTimeQueueLength, setArrivalTimeQueueOverflowBehavior, setIfFeasible, setInitialArrivalTimeQueueLength |
Methods inherited from class javax.realtime.ReleaseParameters |
---|
getCost, getCostOverrunHandler, getDeadline, getDeadlineMissHandler, setCost, setCostOverrunHandler, setDeadline, setDeadlineMissHandler, setIfFeasible |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String mitViolationExcept
public static final String mitViolationIgnore
public static final String mitViolationReplace
public static final String mitViolationSave
Constructor Detail |
---|
public SporadicParameters(RelativeTime interarrival)
public SporadicParameters(RelativeTime interarrival, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
interarrival
- The minimum interarrival time for two
successive releases of an associated schedulable object. This
parameter will be copied, changes to its value will have no
effect on this SporadicParameters once the SporadicParameters
object has been created.cost
- The CPU time required for each release. If cost
monitoring is performed, this gives the maximum amount of CPU
time that will be allowed for each release. In any case, this may
be used by the feasibility analysis. If null, the default value
will be new RelativeTime(0, 0). Note that on a system with cost
monitoring, this default value will allow no execution time for
the associated schedulable object.deadline
- The deadline for the completion of one release,
relative to the release time of that release. If null, the
default value is a new instance of
RealtiveTime(Long.MAX_VALUE, 999999).overrunHandler
- This handler will be invoked if the cost of
one invocation exceeds the cost parameter. If null, there will be
no overrunHandler.
For JamaicaVM, cost overrun checking is enabled if CpuTime.CPU_TIME_SUPPORTED
is true. The
accuracy of the cost enforcement can be specified in nanoseconds
via the property jamaica.cost_monitoring_accuracy. The default
value is 5000000, i.e., 5milliseconds.
missHandler
- This handler will be invoked if the deadline
of one release is missed. If null, there will be no deadline.
IllegalArgumentException
- if the interarrival is
null or negative or zero, if cost is negative or deadline is
negative or zero.Method Detail |
---|
public boolean setIfFeasible(RelativeTime interarrival, RelativeTime cost, RelativeTime deadline)
interarrival
- The minimum interarrival time for two
successive releases of an associated schedulable object. This
parameter will be copied, changes to its value will have no
effect on this SporadicParameters once the SporadicParameters
object has been created.cost
- The CPU time required for each release. If cost
monitoring is performed, this gives the maximum amount of CPU
time that will be allowed for each release. In any case, this may
be used by the feasibility analysis. If null, the default value
will be new RelativeTime(0, 0). Note that on a system with cost
monitoring, this default value will allow no execution time for
the associated schedulable object.deadline
- The deadline for the completion of one release,
relative to the release time of that release. If null, the
default value is a new instance of
RealtiveTime(Long.MAX_VALUE, 999999).
IllegalArgumentException
- if the interarrival is
null or negative or zero, if cost is negative or deadline is
negative or zero.public RelativeTime getMinimumInterarrival()
public void setMinimumInterarrival(RelativeTime interarrival)
interarrival
- The minimum interarrival time for two
successive releases of an associated schedulable object. This
parameter will be copied, changes to its value will have no
effect on this SporadicParameters once the SporadicParameters
object has been created.
IllegalArgumentException
- if the interarrival is
null or negative or zero.public String getMitViolationBehavior()
public void setMitViolationBehavior(String behavior)
behavior
- one of mitViolationExcept, mitViolationIgnore,
mitViolationReplace, or mitViolationSave.
IllegalArgumentException
- if behavior is not one of the
constants arrivalTimeQueueOverflowExcept,
arrivalTimeQueueOverflowIgnore, arrivalTimeQueueOverflowReplace,
arrivalTimeQueueOverflowSave.public Object clone()
clone
in class AperiodicParameters
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |