javax.realtime
Interface Schedulable

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
AsyncEventHandler, BoundAsyncEventHandler, NoHeapRealtimeThread, RealtimeThread

public interface Schedulable
extends java.lang.Runnable

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 scheduling, 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 scheduling, 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

addIfFeasible

boolean addIfFeasible()
This method first performs a feasibility analysis with 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.

Returns:
True if inclusion of 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.
Since:
1.0.1 Promoted to the Schedulable interface

addToFeasibility

boolean addToFeasibility()
Inform the scheduler and cooperating facilities that this instance of Schedulable should be considered in feasibility analysis until further notified.

If the object is already included in the feasibility set, do nothing.

Returns:
True, if the resulting system is feasible. False, if not.

getMemoryParameters

MemoryParameters getMemoryParameters()
Gets a reference to the MemoryParameters object for this schedulable object.

Returns:
A reference to the current MemoryParameters object.

getProcessingGroupParameters

ProcessingGroupParameters getProcessingGroupParameters()
Gets a reference to the ProcessingGroupParameters object for this schedulable object.

Returns:
A reference to the current ProcessingGroupParameters object.

getReleaseParameters

ReleaseParameters getReleaseParameters()
Gets a reference to the ReleaseParameters object for this schedulable object.

Returns:
A reference to the current ReleaseParameters object.

getScheduler

Scheduler getScheduler()
Gets a reference to the Scheduler object for this schedulable object.

Returns:
A reference to the associated Scheduler object.

getSchedulingParameters

SchedulingParameters getSchedulingParameters()
Gets a reference to the SchedulingParameters object for this schedulable object.

Returns:
A reference to the current SchedulingParameters object.

removeFromFeasibility

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.

Returns:
True, if the removal was successful. False, if the schedulable object cannot be removed from the scheduler's feasibility set; e.g., the schedulable object is not part of the scheduler's feasibility set.

setIfFeasible

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. 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.

Parameters:
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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().
Since:
1.0.1 Promoted to the Schedulable interface.

setIfFeasible

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. 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.

Parameters:
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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().
Since:
1.0.1 Promoted to the Schedulable interface.

setIfFeasible

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. 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.

Parameters:
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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().
Since:
1.0.1 Promoted to the Schedulable interface.

setIfFeasible

boolean setIfFeasible(SchedulingParameters scheduling,
                      ReleaseParameters release,
                      MemoryParameters memory)
This method first performs a feasibility analysis using the proposed parameter objects as replacements for the current parameters of 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.

Parameters:
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.)
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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().
Since:
1.0.1

setIfFeasible

boolean setIfFeasible(SchedulingParameters scheduling,
                      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. 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.

Parameters:
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.)
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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().
Since:
1.0.1

setMemoryParameters

void setMemoryParameters(MemoryParameters memory)
Sets the memory parameters associated with this instance of 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.

Parameters:
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.)
Throws:
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.

setMemoryParametersIfFeasible

boolean setMemoryParametersIfFeasible(MemoryParameters memory)
This method first performs a feasibility analysis using the proposed parameter object as replacement for the current parameter of 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.

Parameters:
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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.

setProcessingGroupParameters

void setProcessingGroupParameters(ProcessingGroupParameters group)
Sets the 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.

Parameters:
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.)
Throws:
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.

setProcessingGroupParametersIfFeasible

boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters group)
This method first performs a feasibility analysis using the proposed parameter object as replacement for the current parameter of 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.

Parameters:
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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.

setReleaseParameters

void setReleaseParameters(ReleaseParameters release)
Sets the release parameters associated with this instance of 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.

Parameters:
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.)
Throws:
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().

setReleaseParametersIfFeasible

boolean setReleaseParametersIfFeasible(ReleaseParameters release)
This method first performs a feasibility analysis using the proposed parameter object as replacement for the current parameter of 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.

Parameters:
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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().

setScheduler

void setScheduler(Scheduler scheduler)
Sets the reference to the Scheduler object. The timing of the change must be agreed between the scheduler currently associated with this schedulable object, and scheduler.

Parameters:
scheduler - A reference to the scheduler that will manage execution of this schedulable object. Null is not a permissible value.
Throws:
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.

setScheduler

void setScheduler(Scheduler scheduler,
                  SchedulingParameters scheduling,
                  ReleaseParameters release,
                  MemoryParameters memoryParameters,
                  ProcessingGroupParameters group)
Sets the scheduler and associated parameter objects. The timing of the change must be agreed between the scheduler currently associated with this schedulable object, and scheduler.

Parameters:
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.)
Throws:
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.

setSchedulingParameters

void setSchedulingParameters(SchedulingParameters scheduling)
Sets the scheduling parameters associated with this instance of 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.

Parameters:
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.)
Throws:
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.

setSchedulingParametersIfFeasible

boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
This method first performs a feasibility analysis using the proposed parameter object as replacement for the current parameter of 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.

Parameters:
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.)
Returns:
True, if the resulting system is feasible and the changes are made. False, if the resulting system is not feasible and no changes are made.
Throws:
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.