public class AperiodicParameters extends ReleaseParameters<AperiodicParameters> implements Cloneable
This class characterizes the release of schedulable objects that can be released at any time. Note that the presence of AperiodicParameters typically makes the feasibility analysis of any set of schedulable objects impossible, unless the total execution time required by aperiodic tasks are restricted by adequate ProcessingGroupParameters.
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 |
arrivalTimeQueueOverflowExcept
The "EXCEPT" policy for dealing with arrival time queue
overflow.
|
static String |
arrivalTimeQueueOverflowIgnore
The "IGNORE" policy for dealing with arrival time queue
overflow.
|
static String |
arrivalTimeQueueOverflowReplace
The "REPLACE" policy for dealing with arrival time queue
overflow.
|
static String |
arrivalTimeQueueOverflowSave
The "SAVE" policy for dealing with arrival time queue
overflow.
|
DISABLE_MONITORING
Constructor and Description |
---|
AperiodicParameters()
Create an AperiodicParameters object.
|
AperiodicParameters(RelativeTime deadline)
Equivalent to
AperiodicParameters(RelativeTime, RelativeTime,
AsyncEventHandler, AsyncEventHandler, boolean) with the argument list
(null, deadline, null, null, false) . |
AperiodicParameters(RelativeTime deadline,
AsyncEventHandler missHandler,
boolean rousable)
Equivalent to
AperiodicParameters(RelativeTime, RelativeTime,
AsyncEventHandler, AsyncEventHandler, boolean) with the argument list
(null, deadline, null, missHandler, rousable) . |
AperiodicParameters(RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Constructor of AperiodicParameters to be used as
ReleaseParameters for AsyncEventHandler if the event handler will
be scheduled aperiodically.
|
AperiodicParameters(RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler,
boolean rousable)
Creates an
AperiodicParameters 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.
|
String |
getArrivalTimeQueueOverflowBehavior()
getArrivalTimeQueueOverflowBehavior returns the current arrival
time queue overflow behavior.
|
int |
getInitialArrivalTimeQueueLength()
getInitialArrivalTimeQueueLength returns the initial length of
the arrival time queue.
|
void |
setArrivalTimeQueueOverflowBehavior(String behavior)
setArrivalTimeQueueOverflowBehavior sets the behavior for the
case of an overflow in the arrival time queue.
|
boolean |
setIfFeasible(RelativeTime cost,
RelativeTime deadline)
This method first performs a feasibility analysis using the new
cost and deadline as replacements for the matching attributes of
this.
|
void |
setInitialArrivalTimeQueueLength(int initial)
setInitialArrivalTimeQueueLength sets the initial number of
elements in the arrival time queue for the schedulable object
that receives this AperiodicParameters in its constructor.
|
getCost, getCost, getCostOverrunHandler, getDeadline, getDeadline, getDeadlineMissHandler, getEventQueueOverflowPolicy, getInitialQueueLength, isRousable, setCost, setCostOverrunHandler, setDeadline, setDeadlineMissHandler, setEventQueueOverflowPolicy, setInitialQueueLength, setRousable
public static final String arrivalTimeQueueOverflowExcept
public static final String arrivalTimeQueueOverflowIgnore
public static final String arrivalTimeQueueOverflowReplace
public static final String arrivalTimeQueueOverflowSave
public AperiodicParameters()
AperiodicParameters(null, null, null, null)
.public AperiodicParameters(RelativeTime deadline, AsyncEventHandler missHandler, boolean rousable)
AperiodicParameters(RelativeTime, RelativeTime,
AsyncEventHandler, AsyncEventHandler, boolean)
with the argument list
(null, deadline, null, missHandler, rousable)
.public AperiodicParameters(RelativeTime deadline)
AperiodicParameters(RelativeTime, RelativeTime,
AsyncEventHandler, AsyncEventHandler, boolean)
with the argument list
(null, deadline, null, null, false)
.public AperiodicParameters(RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
StaticIllegalArgumentException
- if cost is negative or
deadline is negative or zero.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.public AperiodicParameters(RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler, boolean rousable)
AperiodicParameters
object.StaticIllegalArgumentException
- when the time value of
cost
is less than zero, or the time
value of deadline
is less than or equal to
zero.IllegalAssignmentError
- when cost
,
deadline
, overrunHandler
or
missHandler
cannot be stored in
this
.cost
- Processing time per invocation. On implementations
which can measure the amount of time a schedulable
object is executed, this value is the maximum amount
of time a schedulable receives. On
implementations which cannot measure execution time,
it is not possible to
determine when any particular object exceeds cost. 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
RelativeTime(Long.MAX_VALUE, 999999)
.overrunHandler
- This handler is invoked when an invocation of
the schedulable exceeds cost. Not
required for minimum implementation. When
null
, the default value is no overrun
handler.missHandler
- This handler is invoked when the
run()
method of the schedulable
object is still executing after the deadline
has passed. When null
, the default
value is no miss handler.rousable
- determines whether or not an instance of
Schedulable
can be prematurely released by a thread
interrupt.public boolean setIfFeasible(RelativeTime cost, RelativeTime deadline)
this
with the
new scheduling characteristics.setIfFeasible
in class ReleaseParameters<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(Long.MAX_VALUE, 999999)
.false
. Aperiodic parameters never yield a feasible
system. (Subclasses of AperiodicParameters
,
such as SporadicParameters
, need not return false.)public int getInitialArrivalTimeQueueLength()
public void setInitialArrivalTimeQueueLength(int initial)
StaticIllegalArgumentException
- if initial is less than zero.initial
- the initial arrival time queue length.public void setArrivalTimeQueueOverflowBehavior(String behavior)
StaticIllegalArgumentException
- if behavior is not one of the
constants arrivalTimeQueueOverflowExcept,
arrivalTimeQueueOverflowIgnore, arrivalTimeQueueOverflowReplace,
arrivalTimeQueueOverflowSave.behavior
- the behavior, must be one of
arrivalTimeQueueOverflowExcept, arrivalTimeQueueOverflowIgnore,
arrivalTimeQueueOverflowReplace, arrivalTimeQueueOverflowSave.public String getArrivalTimeQueueOverflowBehavior()
public Object clone()
clone
in class ReleaseParameters<AperiodicParameters>
Cloneable
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2024 aicas GmbH. All Rights Reserved.