public class SporadicParameters extends AperiodicParameters implements Cloneable
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.
Modifier and Type | Field and Description |
---|---|
static String |
mitViolationExcept
Deprecated.
RTSJ V2.0
|
static String |
mitViolationIgnore
Deprecated.
RTSJ V2.0
|
static String |
mitViolationReplace
Deprecated.
RTSJ V2.0
|
static String |
mitViolationSave
Deprecated.
RTSJ V2.0
|
arrivalTimeQueueOverflowExcept, arrivalTimeQueueOverflowIgnore, arrivalTimeQueueOverflowReplace, arrivalTimeQueueOverflowSave
DISABLE_MONITORING
Constructor and Description |
---|
SporadicParameters(RelativeTime minInterarrival)
Create a SporadicParameters object.
|
SporadicParameters(RelativeTime minInterarrival,
RelativeTime cost,
AsyncEventHandler overrunhandler,
boolean rousable)
Equivalent to
SporadicParameters(RelativeTime, RelativeTime,
RelativeTime, AsyncEventHandler, AsyncEventHandler, boolean) with an
argument list of (minInterarrival, null, deadline, null,
missHandler, rousable) . |
SporadicParameters(RelativeTime minInterarrival,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Constructor of SporadicParameters to be used as ReleaseParameters
for AsyncBaseEventHandler if the event handler will be scheduled
aperiodically with a miminum interarrival time between each two
releases.
|
SporadicParameters(RelativeTime minInterarrival,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler,
boolean rousable)
Creates a
SporadicParameters object. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
clone creates a clone of this object with the same parameters but
without association to any schedulable object.
|
RelativeTime |
getMinimumInterarrival()
Determines the current value of minimal interarrival.
|
RelativeTime |
getMinimumInterarrival(RelativeTime value)
Determines the current value of minimum interarrival.
|
MinimumInterarrivalPolicy |
getMinimumInterarrivalPolicy()
Gets the arrival time queue policy for handling minimal interarrival
time underflow.
|
String |
getMitViolationBehavior()
Deprecated.
as of RTSJ 2.0
|
boolean |
setIfFeasible(RelativeTime cost,
RelativeTime deadline)
Deprecated.
as of RTSJ 2.0, because the framework for feasibility
analysis is inadequate.
|
boolean |
setIfFeasible(RelativeTime interarrival,
RelativeTime cost,
RelativeTime deadline)
Deprecated.
as of RTSJ 2.0, because the framework for feasibility
analysis is inadequate.
|
SporadicParameters |
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.
|
SporadicParameters |
setMinimumInterarrivalPolicy(MinimumInterarrivalPolicy policy)
Sets the policy for handling the arrival time queue when the
new arrival time is closer to the previous arrival time than the
minimum interarrival time given in
this . |
void |
setMitViolationBehavior(String behavior)
Deprecated.
as of RTSJ 2.0
|
getArrivalTimeQueueOverflowBehavior, getInitialArrivalTimeQueueLength, setArrivalTimeQueueOverflowBehavior, setInitialArrivalTimeQueueLength
getCost, getCost, getCostOverrunHandler, getDeadline, getDeadline, getDeadlineMissHandler, getEventQueueOverflowPolicy, getInitialQueueLength, isRousable, setCost, setCostOverrunHandler, setDeadline, setDeadlineMissHandler, setEventQueueOverflowPolicy, setInitialQueueLength, setRousable
@Deprecated public static final String mitViolationExcept
@Deprecated public static final String mitViolationIgnore
@Deprecated public static final String mitViolationReplace
@Deprecated public static final String mitViolationSave
public SporadicParameters(RelativeTime minInterarrival)
SporadicParameters(minInterarrival, null, null, null, null)
.public SporadicParameters(RelativeTime minInterarrival, RelativeTime cost, AsyncEventHandler overrunhandler, boolean rousable)
SporadicParameters(RelativeTime, RelativeTime,
RelativeTime, AsyncEventHandler, AsyncEventHandler, boolean)
with an
argument list of (minInterarrival, null, deadline, null,
missHandler, rousable)
.public SporadicParameters(RelativeTime minInterarrival, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler, boolean rousable)
SporadicParameters
object.StaticIllegalArgumentException
- when minInterarrival
is null
or its time value is not greater than
zero, or the time value of cost
is less than zero,
or the time value of deadline
is not greater than
zero, or when the chronograph associated with deadline
and minInterarrival
parameters are not identical or not
an instance of Clock
.IllegalAssignmentError
- when minInterarrival
,
cost
, deadline
, overrunHandler
or
missHandler
cannot be stored in this
.minInterarrival
- The release times of the schedulable
will occur no closer than this interval. This time object
is treated as if it were copied. Changes to
minInterarrival
will not affect the
SporadicParameters
object. There is no default
value. When minInterarrival
is null
an illegal argument exception is thrown.cost
- Processing time per release. On implementations which
can measure the amount of time a schedulable is
executed, this value is the maximum amount of time a
schedulable receives per release. When
null
, the default value is a new instance of
RelativeTime(0,0)
.deadline
- The latest permissible completion time measured
from the release time of the associated invocation of the
schedulable. When null
, the default value is a new
instance of minInterarrival
:
new RelativeTime(minInterarrival)
.overrunHandler
- This handler is invoked when an invocation of
the schedulable exceeds cost. Not required for
minimum implementation. When null
no overrun
handler will be used.missHandler
- This handler is invoked when the
run()
method of the schedulable is
still executing after the deadline has passed. When
null
, no deadline miss handler will be used.rousable
- Determines whether or not an instance of
Schedulable
can be prematurely released by a thread
interrupt.public SporadicParameters(RelativeTime minInterarrival, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
StaticIllegalArgumentException
- if the interarrival is
null or negative or zero, if cost is negative or deadline is
negative or zero.minInterarrival
- 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. When null, the default
value is a new instance of RelativeTime(0,0).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.@Deprecated public boolean setIfFeasible(RelativeTime cost, RelativeTime deadline)
this
with the new
scheduling characteristics.setIfFeasible
in class AperiodicParameters
StaticIllegalArgumentException
- when the time value of
cost
is less than zero, or the time value of
deadline
is less than or equal to zero, or
the values are incompatible with the scheduler for any of
the schedulables which are presently using this
parameter object.IllegalAssignmentError
- when cost
or
deadline
cannot be stored in
this
.cost
- The proposed cost used to determine when any particular
object exceeds cost. When null
, the default
value is a new instance of RelativeTime(0,0)
.deadline
- The proposed deadline. When null
,
the default value is a new instance of RelativeTime(mit)
.true
, when the resulting system is feasible and
the changes are made;
false
, when the resulting system is
not feasible and no changes are made.@Deprecated public boolean setIfFeasible(RelativeTime interarrival, RelativeTime cost, RelativeTime deadline)
StaticIllegalArgumentException
- if the interarrival is
null or negative or zero, if cost is negative or deadline is
negative or zero.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).public RelativeTime getMinimumInterarrival()
public RelativeTime getMinimumInterarrival(RelativeTime value)
value
- A relative time object to fill and return.value
or, when null
, the last object used
to set the minimal interarrival, set to the current value
of minimal interarrival.public SporadicParameters setMinimumInterarrival(RelativeTime interarrival)
StaticIllegalArgumentException
- if the interarrival is
null or negative or zero.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.public SporadicParameters setMinimumInterarrivalPolicy(MinimumInterarrivalPolicy policy)
this
.policy
- The current policy for MIT violations.public MinimumInterarrivalPolicy getMinimumInterarrivalPolicy()
@Deprecated public String getMitViolationBehavior()
@Deprecated public void setMitViolationBehavior(String behavior)
StaticIllegalArgumentException
- if behavior is not one of the
constants arrivalTimeQueueOverflowExcept,
arrivalTimeQueueOverflowIgnore, arrivalTimeQueueOverflowReplace,
arrivalTimeQueueOverflowSave.behavior
- one of mitViolationExcept, mitViolationIgnore,
mitViolationReplace, or mitViolationSave.public Object clone()
clone
in class AperiodicParameters
Cloneable
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2025 aicas GmbH. All Rights Reserved.