|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.ReleaseParameters
The top-level class for release characteristics of schedulable
objects.
When a reference to a
ReleaseParameters
object is given
as a parameter to a constructor, the
ReleaseParameters
object becomes bound
to the object being created. Changes to the values in the
ReleaseParameters
object affect the constructed object. If given to more than one constructor,
then changes to the values in the
ReleaseParameters
object affect all
of the associated objects. Note that this is a one-to-many relationship and
not a many-to-many.
Only changes to an
ReleaseParameters
> object caused by methods
on that object cause the change to propagate to all schedulable objects using the
object. For instance, invoking setDeadline
on a
ReleaseParameters
instance
will make the change, and then notify that the scheduler that the object has been
changed. At that point the object is reconsidered for every SO that uses it.
Invoking a method on the
RelativeTime
object that is the deadline for this
object may change the time value but it does not pass the new time value to the
scheduler at that
time. Even though the changed time value is referenced by
ReleaseParameters
objects, it will not change the behavior of
the SOs that use the parameter
object until a setter method on the
ReleaseParameters
object is invoked,
or the parameter object is used in setReleaseParameters()
or a constructor for an SO.
Release parameters use
HighResolutionTime
values for
cost, and deadline. Since the
times are expressed as a
HighResolutionTime
values, these values use
accurate timers with nanosecond
granularity. The actual
resolution available and even the quantity the timers measure
depend on the clock associated with each time value.
The implementation must use modified copy semantics for each
HighResolutionTime
parameter value.
The value of each time object should be treated as if it were copied at the time
it is passed to the parameter object, but the object reference must also be retained.
For instance, the value returned by getCost()
must be the same object
passed in by setCost(), but any changes made to the time value of the cost must not
take effect in the associated
ReleaseParameters
instance unless they are
passed to the parameter object again, e.g. with a new invocation of
setCost
.
Attribute |
Default Value |
---|---|
cost | new RelativeTime(0,0) |
deadline | no default |
overrunHandler | None |
missHandler | None |
Caution: This class is explicitly unsafe in multithreaded situations when it is being changed. No synchronization is done. It is assumed that users of this class who are mutating instances will be doing their own synchronization at a higher level.
Caution: The cost
parameter time should be considered to be
measured against the target platform.
Note: Cost measurement and enforcement is an optional facility for implementations of the RTSJ.
Field Summary | |
protected RelativeTime |
cost
The cost of this object |
protected RelativeTime |
deadline
The deadline of this object |
protected AsyncEventHandler |
missHandler
The miss handler of this object |
protected AsyncEventHandler |
overrunHandler
The overrun handler of this object |
Constructor Summary | |
protected |
ReleaseParameters()
Void constructor. |
|
ReleaseParameters(RelativeTime cost,
RelativeTime deadline,
AsyncEventHandler overrunHandler,
AsyncEventHandler missHandler)
Constructor. |
Method Summary | |
RelativeTime |
getCost()
Return the cost of this object. |
AsyncEventHandler |
getCostOverrunHandler()
Return the cost overrun handler of this object. |
RelativeTime |
getDeadline()
Return the deadline of this object. |
AsyncEventHandler |
getDeadlineMissHandler()
Return the deadline miss handler of this object. |
void |
setCost(RelativeTime cost)
Set the cost of this object |
void |
setCostOverrunHandler(AsyncEventHandler overrunHandler)
Set the cost overrun handler of this object |
void |
setDeadline(RelativeTime deadline)
Set the deadline of this object |
void |
setDeadlineMissHandler(AsyncEventHandler missHandler)
Set the deadline miss handler for this object |
boolean |
setIfFeasible(RelativeTime cost,
RelativeTime deadline)
Set the cost and deadline of this object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected RelativeTime cost
protected RelativeTime deadline
protected AsyncEventHandler overrunHandler
protected AsyncEventHandler missHandler
Constructor Detail |
protected ReleaseParameters()
public ReleaseParameters(RelativeTime cost, RelativeTime deadline, AsyncEventHandler overrunHandler, AsyncEventHandler missHandler)
cost
- deadline
- overrunHandler
- missHandler
- Method Detail |
public RelativeTime getCost()
public AsyncEventHandler getCostOverrunHandler()
public RelativeTime getDeadline()
public AsyncEventHandler getDeadlineMissHandler()
public void setCost(RelativeTime cost)
cost
- the cost to be setpublic void setCostOverrunHandler(AsyncEventHandler overrunHandler)
overrunHandler
- the new cost overrun handlerpublic void setDeadline(RelativeTime deadline)
deadline
- the new deadlinepublic void setDeadlineMissHandler(AsyncEventHandler missHandler)
missHandler
- the new deadline miss handlerpublic boolean setIfFeasible(RelativeTime cost, RelativeTime deadline)
cost
- deadline
-
Not currently implemented
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |