|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Schedulable
Handlers and other objects can be run by a Scheduler
if they
provide a run()
method and the methods defined below. The
Scheduler
uses this information to create a suitable context
to execute the run()
method.
Method Summary | |
---|---|
boolean |
addIfFeasible()
This method first performs a feasibility analysis with this
added to the system. |
boolean |
addToFeasibility()
Inform the scheduler and cooperating facilities that this instance of Schedulable should be considered in
feasibility analysis until further notified. |
MemoryParameters |
getMemoryParameters()
Gets a reference to the MemoryParameters object for this
schedulable object. |
ProcessingGroupParameters |
getProcessingGroupParameters()
Gets a reference to the ProcessingGroupParameters object for this
schedulable object. |
ReleaseParameters |
getReleaseParameters()
Gets a reference to the ReleaseParameters object for this
schedulable object. |
Scheduler |
getScheduler()
Gets a reference to the Scheduler object for this
schedulable object. |
SchedulingParameters |
getSchedulingParameters()
Gets a reference to the SchedulingParameters object for this
schedulable object. |
boolean |
removeFromFeasibility()
Inform the scheduler and cooperating facilities that this instance of Schedulable should not be considered in
feasibility analysis until it is further notified. |
boolean |
setIfFeasible(ReleaseParameters release,
MemoryParameters memory)
This method first performs a feasibility analysis using the proposed parameter objects as replacements for the current parameters of this . |
boolean |
setIfFeasible(ReleaseParameters release,
MemoryParameters memory,
ProcessingGroupParameters group)
This method first performs a feasibility analysis using the proposed parameter objects as replacements for the current parameters of this. |
boolean |
setIfFeasible(ReleaseParameters release,
ProcessingGroupParameters group)
This method first performs a feasibility analysis using the proposed parameter objects as replacements for the current parameters of this. |
boolean |
setIfFeasible(SchedulingParameters sched,
ReleaseParameters release,
MemoryParameters memory)
This method first performs a feasibility analysis using the proposed parameter objects as replacements for the current parameters of this. |
boolean |
setIfFeasible(SchedulingParameters sched,
ReleaseParameters release,
MemoryParameters memory,
ProcessingGroupParameters group)
This method first performs a feasibility analysis using the proposed parameter objects as replacements for the current parameters of this. |
void |
setMemoryParameters(MemoryParameters memory)
Sets the memory parameters associated with this instance of Schedulable . |
boolean |
setMemoryParametersIfFeasible(MemoryParameters memory)
This method first performs a feasibility analysis using the proposed parameter object as replacement for the current parameter of this . |
void |
setProcessingGroupParameters(ProcessingGroupParameters group)
Sets the ProcessingGroupParameters of this . |
boolean |
setProcessingGroupParametersIfFeasible(ProcessingGroupParameters group)
This method first performs a feasibility analysis using the proposed parameter object as replacement for the current parameter of this . |
void |
setReleaseParameters(ReleaseParameters release)
Sets the release parameters associated with this instance of Schedulable . |
boolean |
setReleaseParametersIfFeasible(ReleaseParameters release)
This method first performs a feasibility analysis using the proposed parameter object as replacement for the current parameter of this. |
void |
setScheduler(Scheduler scheduler)
Sets the reference to the Scheduler object. |
void |
setScheduler(Scheduler scheduler,
SchedulingParameters scheduling,
ReleaseParameters release,
MemoryParameters memoryParameters,
ProcessingGroupParameters group)
Sets the scheduler and associated parameter objects. |
void |
setSchedulingParameters(SchedulingParameters scheduling)
Sets the scheduling parameters associated with this instance of Schedulable . |
boolean |
setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
This method first performs a feasibility analysis using the proposed parameter object as replacement for the current parameter of this. |
Methods inherited from interface java.lang.Runnable |
---|
run |
Method Detail |
---|
boolean addIfFeasible()
this
added to the system. If the resulting system is feasible,
inform the scheduler and cooperating facilities that this
instance of Schedulable should be considered in feasibility
analysis until further notified. If the analysis showed that
the system including this would not be feasible, this method
does not admit this to the feasibility set.
If the object is already included in the feasibility set, do nothing.
this
in the
feasibility set yields a feasible system, and false
otherwise. If true is returned then this
is known
to be in the feasibility set. If false is returned
this
was not added to the feasibility set, but may
already have been present.boolean addToFeasibility()
Schedulable
should be considered in
feasibility analysis until further notified.
If the object is already included in the feasibility set, do nothing.
MemoryParameters getMemoryParameters()
MemoryParameters
object for this
schedulable object.
MemoryParameters
object.ProcessingGroupParameters getProcessingGroupParameters()
ProcessingGroupParameters
object for this
schedulable object.
ProcessingGroupParameters
object.ReleaseParameters getReleaseParameters()
ReleaseParameters
object for this
schedulable object.
ReleaseParameters
object.Scheduler getScheduler()
Scheduler
object for this
schedulable object.
Scheduler
object.SchedulingParameters getSchedulingParameters()
SchedulingParameters
object for this
schedulable object.
SchedulingParameters
object.boolean removeFromFeasibility()
Schedulable
should not be considered in
feasibility analysis until it is further notified.
boolean setIfFeasible(ReleaseParameters release, MemoryParameters memory)
this
. If the resulting system is feasible, this
method replaces the current parameters of this
with the
proposed ones.
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
release
- The proposed release parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)memory
- The proposed memory parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the
parameter values are not compatible with the schedulable
object's scheduler.
Also thrown if this schedulable object is no-heap and any of the
proposed parameter objects are located in heap memory.
IllegalAssignmentError
- Thrown if this
cannot
hold references to the proposed parameter objects, or the
parameter objects cannot hold a reference to this
.
java.lang.IllegalThreadStateException
- Thrown if the new release parameters change
the schedulable object from periodic scheduling to some other protocol and the
schedulable object is currently
waiting for the next release
in RealtimeThread.waitForNextPeriod()
or RealtimeThread.waitForNextPeriodInterruptible()
.Schedulable
interface.boolean setIfFeasible(ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details. This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
release
- The proposed release parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)memory
- The proposed memory parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)group
- The proposed processing group parameters.
If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the parameter
values are not compatible with the schedulable object's
scheduler. Also thrown if this schedulable object is no-heap
and any of the proposed parameter objects are located in heap
memory.
IllegalAssignmentError
- Thrown if this cannot hold
references to the proposed parameter objects, or the
parameter objects cannot hold a reference to this.
java.lang.IllegalThreadStateException
- Thrown if the new release parameters change
the schedulable object from periodic scheduling to some other protocol and the
schedulable object is currently
waiting for the next release
in RealtimeThread.waitForNextPeriod()
or RealtimeThread.waitForNextPeriodInterruptible()
.Schedulable
interface.boolean setIfFeasible(ReleaseParameters release, ProcessingGroupParameters group)
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details. This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
release
- The proposed release parameters.
If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)group
- The proposed processing group parameters.
If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the parameter
values are not compatible with the schedulable object's
scheduler. Also thrown if this schedulable object is no-heap
and any of the proposed parameter objects are located in heap
memory.
IllegalAssignmentError
- Thrown if this
cannot hold references to the proposed parameter objects, or
the parameter objects cannot hold a reference to
this
.
java.lang.IllegalThreadStateException
- Thrown if the new release parameters change
the schedulable object from periodic scheduling to some other protocol and the
schedulable object is currently
waiting for the next release
in RealtimeThread.waitForNextPeriod()
or RealtimeThread.waitForNextPeriodInterruptible()
.Schedulable
interface.boolean setIfFeasible(SchedulingParameters sched, ReleaseParameters release, MemoryParameters memory)
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details. This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
sched
- The proposed scheduling parameters. If null, the
default value is governed by the associated scheduler (a new
object is created if the default value is not null). (See
PriorityScheduler
.)release
- The proposed release parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)memory
- The proposed memory parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the parameter
values are not compatible with the schedulable object's
scheduler. Also thrown if this schedulable object is no-heap
and any of the proposed parameter objects are located in heap
memory.
IllegalAssignmentError
- Thrown if this cannot hold
references to the proposed parameter objects, or the parameter
objects cannot hold a reference to this
.
java.lang.IllegalThreadStateException
- Thrown if the new release parameters change
the schedulable object from periodic scheduling to some other protocol and the
schedulable object is currently
waiting for the next release
in RealtimeThread.waitForNextPeriod()
or RealtimeThread.waitForNextPeriodInterruptible()
.boolean setIfFeasible(SchedulingParameters sched, ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
sched
- The proposed scheduling parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)release
- The proposed release parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)memory
- The proposed memory parameters. If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)group
- The proposed processing group parameters.
If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the parameter
values are not compatible with the schedulable object's
scheduler. Also thrown if this schedulable object is no-heap
and any of the proposed parameter objects are located in heap
memory.
IllegalAssignmentError
- Thrown if this cannot hold
references to the proposed parameter objects, or the parameter
objects cannot hold a reference to this
.
java.lang.IllegalThreadStateException
- Thrown if the new release parameters change
the schedulable object from periodic scheduling to some other protocol and the
schedulable object is currently
waiting for the next release
in RealtimeThread.waitForNextPeriod()
or RealtimeThread.waitForNextPeriodInterruptible()
.void setMemoryParameters(MemoryParameters memory)
Schedulable
.
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
Since this affects the constraints expressed in the memory parameters of the existing schedulable objects, this may change the feasibility of the current system.
memory
- A MemoryParameters
object which will become the memory parameters
associated with this
after the method call.
If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown if
memory
is not compatible with the schedulable
object's scheduler. Also thrown if this schedulable object is
no-heap and memory is located in heap memory.
IllegalAssignmentError
- Thrown if the schedulable
object cannot hold a reference to memory
, or if
memory
cannot hold a reference to this
schedulable object instance.boolean setMemoryParametersIfFeasible(MemoryParameters memory)
this
. If the resulting system is
feasible, this method replaces the current parameter of
this
with the proposed one.
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
memory
- The proposed memory parameters.
If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null). (See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the parameter
value is not compatible with the schedulable object's
scheduler. Also thrown if this schedulable object is no-heap
and the proposed parameter object is located in heap memory.
IllegalAssignmentError
- Thrown if this
cannot hold a reference to the proposed parameter object, or
the parameter object cannot hold a reference to
this
.void setProcessingGroupParameters(ProcessingGroupParameters group)
ProcessingGroupParameters
of this
.
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
Since this affects the constraints expressed in the processing group parameters of the existing schedulable objects, this may change the feasibility of the current system.
group
- A ProcessingGroupParameters
object which
will take effect as determined by the associated scheduler. If
null, the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when group
is not compatible with the scheduler for this schedulable
object. Also thrown if this schedulable object is no-heap and
group is located in heap memory.
IllegalAssignmentError
- Thrown if this
object
cannot hold a reference to group
or
group
cannot hold a reference to this
.boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters group)
this
. If the resulting system is
feasible, this method replaces the current parameter of
this
with the proposed one.
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
group
- The proposed processing group parameters.
If null,
the default value is governed by the associated scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the parameter
value is not compatible with the schedulable object's
scheduler. Also thrown if this schedulable object is no-heap
and the proposed parameter object is located in heap memory.
IllegalAssignmentError
- Thrown if this cannot hold a
reference to the proposed parameter object, or the parameter
object cannot hold a reference to this.void setReleaseParameters(ReleaseParameters release)
Schedulable
.
Since this affects the constraints expressed in the release parameters of the existing schedulable objects, this may change the feasibility of the current system.
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. The different properties of the release parameters may take effect at different times. See the documentation for the scheduler for details.
release
- A ReleaseParameters
object which will
become the release parameters associated with this after the
method call, and take effect as determined by the associated
scheduler. If null, the default value is governed by the
associated scheduler (a new object is created if the default
value is not null). (See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when
release
is not compatible with the associated
scheduler. Also thrown if this schedulable object is no-heap
and release is located in heap memory.
IllegalAssignmentError
- Thrown if this
object
cannot hold a reference to release
or
release
cannot hold a reference to this
.
java.lang.IllegalThreadStateException
- Thrown if the new release parameters change
the schedulable object from periodic scheduling to some other protocol and the
schedulable object is currently
waiting for the next release
in RealtimeThread.waitForNextPeriod()
or RealtimeThread.waitForNextPeriodInterruptible()
.boolean setReleaseParametersIfFeasible(ReleaseParameters release)
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
release
- The proposed release parameters. If null, the
default value is governed by the associated scheduler (a new
object is created if the default value is not null). (See
PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the parameter
value is not compatible with the schedulable object's
scheduler. Also thrown if this schedulable object is no-heap
and the proposed parameter object is located in heap memory.
IllegalAssignmentError
- Thrown if this cannot hold a
reference to the proposed parameter object, or the parameter
object cannot hold a reference to this.
java.lang.IllegalThreadStateException
- Thrown if the new release parameters change
the schedulable object from periodic scheduling to some other protocol and the
schedulable object is currently
waiting for the next release
in RealtimeThread.waitForNextPeriod()
or RealtimeThread.waitForNextPeriodInterruptible()
.void setScheduler(Scheduler scheduler)
scheduler
- A reference to the scheduler that will manage
execution of this schedulable object. Null
is not a
permissible value.
java.lang.IllegalArgumentException
- Thrown when
scheduler
is null, or the schedulable object's
existing parameter values are not compatible with
scheduler. Also thrown if this schedulable object is no-heap
and scheduler is located in heap memory.
IllegalAssignmentError
- Thrown if the schedulable object
cannot hold a reference to scheduler
.
java.lang.SecurityException
- Thrown if the caller is not permitted to set the scheduler for this
schedulable object.void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memoryParameters, ProcessingGroupParameters group)
scheduler
- A reference to the scheduler that will manage the execution of this
schedulable object.
Null is not a permissible value.scheduling
- A reference to the SchedulingParameters
which will be associated with this
.
If null,
the default value is governed by scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)release
- A reference to the ReleaseParameters
which will be associated with this
.
If null,
the default value is governed by scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)memoryParameters
- A reference to the MemoryParameters
which
will be associated with this
.
If null,
the default value is governed by scheduler
(a new object is created if the default value is not null).
(See PriorityScheduler
.)group
- A reference to the ProcessingGroupParameters
which
will be associated with this
.
If null,
the default value is governed by scheduler
(a new object is created). (See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when scheduler is null
or the parameter values are not compatible with scheduler. Also
thrown when this schedulable object is no-heap and scheduler,
scheduling release, memoryParameters, or group is located in
heap memory.
IllegalAssignmentError
- Thrown if this
object
cannot hold references to all the parameter objects or
the parameters cannot hold references to this
.
java.lang.IllegalThreadStateException
- Thrown if the new release parameters change
the schedulable object from periodic scheduling to some other protocol and the
schedulable object is currently
waiting for the next release
in RealtimeThread.waitForNextPeriod()
or RealtimeThread.waitForNextPeriodInterruptible()
.
java.lang.SecurityException
- Thrown if the caller is not permitted to set the scheduler for this
schedulable object.void setSchedulingParameters(SchedulingParameters scheduling)
Schedulable
.
Since this affects the scheduling parameters of the existing schedulable objects, this may change the feasibility of the current system.
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
scheduling
- A reference to the SchedulingParameters
object. If null, the default value is
governed by the associated scheduler (a new object is
created if the default value is not null). (See PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when scheduling is
not compatible with the associated scheduler. Also thrown if
this schedulable object is no-heap and scheduling is located
in heap memory.
IllegalAssignmentError
- Thrown if this
object
cannot hold a reference to scheduling
or
scheduling
cannot hold a reference to this
.boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
This change becomes effective under conditions determined by the scheduler controlling the schedulable object. For instance, the change may be immediate or it may be delayed until the next release of the schedulable object. See the documentation for the scheduler for details.
This method does not require that the schedulable object be in the feasibility set before it is called. If it is not initially a member of the feasibility set it will be added if the resulting system is feasible.
scheduling
- The proposed scheduling parameters. If null,
the default value is governed by the associated scheduler (a
new object is created if the default value is not null). (See
PriorityScheduler
.)
java.lang.IllegalArgumentException
- Thrown when the parameter
value is not compatible with the schedulable object's
scheduler. Also thrown if this schedulable object is no-heap
and the proposed parameter object is located in heap memory.
IllegalAssignmentError
- Thrown if this cannot hold a
reference to the proposed parameter object, or the parameter
object cannot hold a reference to this.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |