public class ProcessingGroupParameters extends Object implements Serializable, Cloneable
Jamaica Real-Time Specification for Java class ProcessingGroupParameters
In a system that supports cost monitoring, the CPU time of a group of schedulable objects that are members of a processing group is limited to the amount specified by the cost parameter per period.
In a system that does not support cost monitoring, the information from the processing group parameters may be used by the feasibility analysis. This is particularly important if schedulable objects with aperiodic release parameters are involved since they would otherwise make feasibility analysis 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 | Class and Description |
---|---|
static interface |
ProcessingGroupParameters.Visitor
An interface for visiting threads and schedulable objects.
|
Constructor and Description |
---|
ProcessingGroupParameters(HighResolutionTime start,
RelativeTime period,
RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Constructor to create a new instance of
ProcessingGroupParameters.
|
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 |
getCost()
getCost returns the current value for cost
|
AsyncEventHandler |
getCostOverrunHandler()
getCostOverrunHandler returns the current cost overrun handler.
|
RelativeTime |
getDeadline()
getDeadline returns the current deadline.
|
AsyncEventHandler |
getDeadlineMissHandler()
getDeadlineMissHandler the current deadline miss handler.
|
RelativeTime |
getPeriod()
getPeriod returns the current period.
|
HighResolutionTime |
getStart()
getStart returns the current start time
|
void |
setCost(RelativeTime cost)
setCost sets the cost value.
|
void |
setCostOverrunHandler(AsyncEventHandler handler)
setCostOverrunHandler set the cost overrun handler.
|
void |
setDeadline(RelativeTime deadline)
setDeadline set the deadline to a new value.
|
void |
setDeadlineMissHandler(AsyncEventHandler handler)
setDeadlineMissHandler sets the deadline miss handler.
|
boolean |
setIfFeasible(RelativeTime period,
RelativeTime cost,
RelativeTime deadline)
setIfFeasible performs a feasibility analysis using the new
period, cost, and deadline parameters.
|
void |
setPeriod(RelativeTime period)
setPeriod sets the period to a new value.
|
void |
setStart(HighResolutionTime start)
setStart sets the start time to a new value.
|
public ProcessingGroupParameters(HighResolutionTime start, RelativeTime period, RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
IllegalArgumentException
- if start is a negative
RelativeTime, if the period is null or negative or zero, if cost
is null or negative or deadline is negative or zero.start
- The start time of the first period described by this
object. A start time of class RelativeTime will be relative to
the time this constructor is called. A start time of class
AbsoluteTime will result in a start at that time or immediately
after the execution of this constructor, whichever comes
later. If null, the default value will be new RelativeTime(0, 0).period
- The time for which the cost budget is
allocated. This argument must not be null or a time <= 0.cost
- The CPU time budget for each period. This must not be
null.deadline
- The deadline for the completion of all members of
this group, relative to the release time of each period. If null,
the default value is a new instance of RelativeTime(period).overrunHandler
- This handler will be invoked if the cost of
of all schedulable objects in this group exceeds the cost
parameter. If null, there will be no overrunHandler.missHandler
- This handler will be invoked if a schedulable
object in this group still executes after the deadline has
passed. If null, there will be no deadline miss handler.public boolean setIfFeasible(RelativeTime period, RelativeTime cost, RelativeTime deadline)
IllegalArgumentException
- if the period is null
or negative or zero, if cost is null or negative or deadline is
negative or zero.period
- The new time for which the cost budget is
allocated. This argument must not be null or a time <= 0.cost
- The new CPU time budget for each period. This must
not be null.deadline
- The new deadline for the completion of all
members of this group, relative to the release time of each
period. If null, the default value is a new instance of
RealtiveTime(period).public RelativeTime getCost()
public AsyncEventHandler getCostOverrunHandler()
public RelativeTime getDeadline()
public AsyncEventHandler getDeadlineMissHandler()
public RelativeTime getPeriod()
public HighResolutionTime getStart()
public void setCost(RelativeTime cost)
IllegalArgumentException
- if cost
is null or negative.cost
- The new CPU time budget for each period. This must
not be null.public void setCostOverrunHandler(AsyncEventHandler handler)
handler
- This handler will be invoked if the cost of
of all schedulable objects in this group exceeds the cost
parameter. If null, there will be no overrunHandler.public void setDeadline(RelativeTime deadline)
IllegalArgumentException
- if deadline is
negative or zero.deadline
- The new deadline for the completion of all
members of this group, relative to the release time of each
period. If null, the default value is a new instance of
RealtiveTime(period).public void setDeadlineMissHandler(AsyncEventHandler handler)
handler
- This handler will be invoked if a schedulable
object in this group still executes after the deadline has
passed. If null, there will be no deadline miss handler.public void setPeriod(RelativeTime period)
IllegalArgumentException
- if period is null or
negative or zero.period
- The new time for which the cost budget is
allocated. This argument must not be null or a time <= 0.public void setStart(HighResolutionTime start)
IllegalArgumentException
- if start is a negative
RelativeTime.start
- The new start time of the first period described by
this object. A start time of class RelativeTime will be relative
to the time this constructor is called. A start time of class
AbsoluteTime will result in a start at that time or immediately
after the execution of this constructor, whichever comes
earlier. If null, the default value will be new
RelativeTime(0, 0).public Object clone()
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.