aicas logoJamaica 6.4 release 1

javax.realtime
Interface Schedulable

All Superinterfaces:
Runnable
All Known Implementing Classes:
AbstractAsyncEventHandler, AsyncEventHandler, BoundAsyncEventHandler, NoHeapRealtimeThread, RealtimeThread

public interface Schedulable
extends Runnable

Jamaica Real-Time Specification for Java class Schedulable.

Schedulable objects are executable entities that are scheduled by the scheduler, that may get assigned execution time, that may be released by events and that may participate in feasibility analysis.

Supported schedulable objects are RealtimeThread and AbstractAsyncEventHandler.


Method Summary
 boolean addIfFeasible()
           addIfFeasible adds this to the feasibility analysis of the associated scheduler if the resulting system will be feasible.
 boolean addToFeasibility()
           addToFeasibility notifies the scheduler associated with this that this schedulable object's scheduling, release, memory and processing group parameters take part in the feasibility analysis.
 MemoryParameters getMemoryParameters()
          getMemoryParameters returns a reference to the MemoryParameters of this Schedulable.
 ProcessingGroupParameters getProcessingGroupParameters()
          getProcessingGroupParameters returns the current ProcessingGroupParameters of this Schedulable.
 ReleaseParameters getReleaseParameters()
          getReleaseParameters returns the current ReleaseParameters of this Schedulable.
 Scheduler getScheduler()
          getScheduler returns the current scheduler of this Schedulable.
 SchedulingParameters getSchedulingParameters()
          getSchedulingParameters returns the SchedulingParameters of this Schedulable.
 boolean removeFromFeasibility()
          removeFromFeasibility informs the scheduler associated with this Schedulable that this Schedulable should no longer be taken into account in the feasibility analysis.
 boolean setIfFeasible(ReleaseParameters release, MemoryParameters memory)
           setIfFeasible performs a feasibility analysis using the provided release and memory parameters.
 boolean setIfFeasible(ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
           setIfFeasible performs a feasibility analysis using the provided release, memory, and processing group parameters.
 boolean setIfFeasible(ReleaseParameters release, ProcessingGroupParameters group)
           setIfFeasible performs a feasibility analysis using the provided release and processing group parameters.
 boolean setIfFeasible(SchedulingParameters sched, ReleaseParameters release, MemoryParameters memory)
           setIfFeasible performs a feasibility analysis using the provided scheduling, release, and memory parameters.
 boolean setIfFeasible(SchedulingParameters sched, ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
           setIfFeasible performs a feasibility analysis using the provided scheduling, release, memory, and processing group parameters.
 void setMemoryParameters(MemoryParameters memory)
           setMemoryParameters replaces the memory parameters for this Schedulable with the parameters provided.
 boolean setMemoryParametersIfFeasible(MemoryParameters memParam)
           setMemoryParametersIfFeasible performs a feasibility analysis using the provided memory parameters.
 void setProcessingGroupParameters(ProcessingGroupParameters groupParameters)
           setProcessingGroupParameters sets the processing group parameters of this Scheduling.
 boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters groupParameters)
           setProcessingGroupParametersIfFeasible performs a feasibility analysis using the provided processing group parameters.
 void setReleaseParameters(ReleaseParameters release)
           setReleaseParameters replaces the release parameters for this Schedulable with the parameters provided.
 boolean setReleaseParametersIfFeasible(ReleaseParameters release)
           setReleaseParametersIfFeasible performs a feasibility analysis using the provided release parameters.
 void setScheduler(Scheduler scheduler)
           setScheduler sets the scheduler for this Schedulable.
 void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memoryParameters, ProcessingGroupParameters processingGroup)
           setScheduler set the scheduler and scheduling, release, memory and processing group parameters for this Schedulable.
 void setSchedulingParameters(SchedulingParameters scheduling)
           setSchedulingParameters sets the scheduling parameters for this Schedulable.
 boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
           setSchedulingParametersIfFeasible performs a feasibility analysis using the provided scheduling parameters.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

addToFeasibility

boolean addToFeasibility()

addToFeasibility notifies the scheduler associated with this that this schedulable object's scheduling, release, memory and processing group parameters take part in the feasibility analysis.

In case this schedulable object is already part of the feasiblility analysis, do nothing.

Returns:
true iff the resulting system is feasible.

addIfFeasible

boolean addIfFeasible()

addIfFeasible adds this to the feasibility analysis of the associated scheduler if the resulting system will be feasible.

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

Returns:
true iff this was admitted to the feasible set. false if this was not admitted or if this was already part of the feasible set.

removeFromFeasibility

boolean removeFromFeasibility()
removeFromFeasibility informs the scheduler associated with this Schedulable that this Schedulable should no longer be taken into account in the feasibility analysis.

Returns:
true iff this could be removed successfully, false iff this was not part of the feasible set of the assigned scheduler.

getMemoryParameters

MemoryParameters getMemoryParameters()
getMemoryParameters returns a reference to the MemoryParameters of this Schedulable.

Returns:
the MemoryParameters of this Schedulable.

getReleaseParameters

ReleaseParameters getReleaseParameters()
getReleaseParameters returns the current ReleaseParameters of this Schedulable.

Returns:
the ReleaseParameters.

getScheduler

Scheduler getScheduler()
getScheduler returns the current scheduler of this Schedulable.

Returns:
the scheduler.

getSchedulingParameters

SchedulingParameters getSchedulingParameters()
getSchedulingParameters returns the SchedulingParameters of this Schedulable.

Returns:
the SchedulingParameters.

getProcessingGroupParameters

ProcessingGroupParameters getProcessingGroupParameters()
getProcessingGroupParameters returns the current ProcessingGroupParameters of this Schedulable.

Returns:
the ProcessingGroupParameters

setMemoryParameters

void setMemoryParameters(MemoryParameters memory)

setMemoryParameters replaces the memory parameters for this Schedulable with the parameters provided.

This change may change the feasibility of the current feasible set of this Schedulable's scheduler.

In JamaicaVM, this change becomes effective immediately.

Parameters:
memory - the new memory parameters. If null, the default value for the associated scheduler will be used.
Throws:
IllegalArgumentException - if the memory parameter value is not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if memory and this reside in memory areas whose objects cannot refer to one another (in both directions).

setReleaseParameters

void setReleaseParameters(ReleaseParameters release)

setReleaseParameters replaces the release parameters for this Schedulable with the parameters provided.

This change may change the feasibility of the current feasible set of this Schedulable's scheduler.

In JamaicaVM, this change of periodic parameters becomes effective after the execution of the next period, i.e., on the next call to waitForNextPeriod or waitForNextPeriodInterruptible.

Parameters:
release - the new release parameters. If null, the default value for the associated scheduler will be used.
Throws:
IllegalArgumentException - if the release parameter value is not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if release and this reside in memory areas whose objects cannot refer to one another (in both directions).
IllegalThreadStateException - If the old release parameters are periodic, the new release parameters are not periodic, and the schedulable object is currently blocked in RealtimeThread.waitForNextPeriod or RealtimeThread.waitForNextPeriodInterruptible.

setScheduler

void setScheduler(Scheduler scheduler)

setScheduler sets the scheduler for this Schedulable. If this has been admitted to the feasible set, it remains in the feasible set.

This change may change the feasibility of the current feasible set of this Schedulable's scheduler.

Parameters:
scheduler - the new scheduler to be used. Must not be null.
Throws:
IllegalArgumentException - iff the scheduler is null or the current parameters of this are not compatible with the new scheduler.
IllegalAssignmentError - if scheduler and this reside in memory areas whose objects cannot refer to one another (in both directions).
SecurityException - if setting of the scheduler is not allowed by the current RealtimeSystem setting.

setScheduler

void setScheduler(Scheduler scheduler,
                  SchedulingParameters scheduling,
                  ReleaseParameters release,
                  MemoryParameters memoryParameters,
                  ProcessingGroupParameters processingGroup)

setScheduler set the scheduler and scheduling, release, memory and processing group parameters for this Schedulable.

The change of the scheduler and scheduling and memory parameters will be immediate for the default scheduler. release and processing group parameters will take effect on the next release.

This change may change the feasibility of the current feasible set of this Schedulable's scheduler.

Parameters:
scheduler - The scheduler to be used for this Schedulable. Must not be null.
scheduling - SchedulingParameters to be associated with the RealtimeThread. If null, the default value of the scheduler will be used.
release - the new release parameters. If null, the default value for the associated scheduler will be used.
memoryParameters - the new memory parameters. If null, the default value for the associated scheduler will be used.
processingGroup - the new processing group parameters to be applied for the next release of this. If null, the default value for the scheduler will be used.
Throws:
IllegalArgumentException - when scheduler is null or the scheduling, release, memory or processing group parameters are not compatible with the scheduler.
IllegalAssignmentError - if scheduler, scheduling, release, memory, or group reside in memory areas whose objects cannot be referred to by this or this object resides in a memory area that cannot be referenced by scheduling, release or memory.
IllegalThreadStateException - If the old release parameters are periodic, the new release parameters are not periodic, and the schedulable object is currently blocked in waitForNextPeriod or waitForNextPeriodInterruptible.
SecurityException - if setting of the scheduler is not allowed by the current RealtimeSystem setting.

setSchedulingParameters

void setSchedulingParameters(SchedulingParameters scheduling)

setSchedulingParameters sets the scheduling parameters for this Schedulable.

In JamaicaVM, this change of scheduling parameters becomes effective immediately for the default PriorityScheduler.

Parameters:
scheduling - the new scheduling parameters.
Throws:
IllegalArgumentException - iff scheduling is not compatible with the scheduler.
IllegalAssignmentError - if scheduling and this reside in memory areas whose objects cannot refer to one another (in both directions).

setProcessingGroupParameters

void setProcessingGroupParameters(ProcessingGroupParameters groupParameters)

setProcessingGroupParameters sets the processing group parameters of this Scheduling.

In JamaicaVM, this change becomes effective immediately.

This change may change the feasibility of the current feasible set of this Schedulable's scheduler.

Parameters:
groupParameters - the new processing group parameters to be applied for the next release of this. If null, use the default value for the scheduler.
Throws:
IllegalArgumentException - if the group argument is not compatible with the scheduler of this RealtimeThread.

setProcessingGroupParametersIfFeasible

boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters groupParameters)

setProcessingGroupParametersIfFeasible performs a feasibility analysis using the provided processing group parameters. If the system remains feasible with these new parameters, parameters are replaced.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
groupParameters - the new processing group parameters. If null, the default value for the associated scheduler will be used.
Returns:
true iff the resulting system is feasible and the new group parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the group parameter value is not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - If group and this reside in memory areas whose objects cannot refer to one another (in both directions).

setSchedulingParametersIfFeasible

boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)

setSchedulingParametersIfFeasible performs a feasibility analysis using the provided scheduling parameters. If the system remains feasible with these new parameters, the scheduling parameters are replaced.

In JamaicaVM, this change of scheduling parameters becomes effective immediately for the default PriorityScheduler.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
scheduling - the new scheduling parameters. If null, the default value of the associated scheduler will be used. This default value may be null.
Returns:
true iff the resulting system is feasible and the new scheduling parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the parameter values are not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if sched, release, memory, or group and this reside in memory areas whose objects cannot refer to one another (in both directions).

setReleaseParametersIfFeasible

boolean setReleaseParametersIfFeasible(ReleaseParameters release)

setReleaseParametersIfFeasible performs a feasibility analysis using the provided release parameters. If the system remains feasible with the new parameters, the parameters are replaced.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
release - the new release parameters. If null, the default value for the associated scheduler will be used.
Returns:
true iff the resulting system is feasible and the new release parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the parameter values are not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if release and this reside in memory areas whose objects cannot refer to one another (in both directions).
IllegalThreadStateException - If the old release parameters are periodic, the new release parameters are not periodic, and the schedulable object is currently blocked in waitForNextPeriod or waitForNextPeriodInterruptible.

setMemoryParametersIfFeasible

boolean setMemoryParametersIfFeasible(MemoryParameters memParam)

setMemoryParametersIfFeasible performs a feasibility analysis using the provided memory parameters. If the system remains feasible with the new memory parameters, the parameters are replaced.

In JamaicaVM, this change becomes effective immediately.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
memParam - the new memory parameters. If null, the default value for the associated scheduler will be used.
Returns:
true iff the resulting system is feasible and the new release, memory and group parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the memory parameter value is not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if memory and this reside in memory areas whose objects cannot refer to one another (in both directions).

setIfFeasible

boolean setIfFeasible(ReleaseParameters release,
                      MemoryParameters memory)

setIfFeasible performs a feasibility analysis using the provided release and memory parameters. If the system remains feasible with these new parameters, the parameters are replaced.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
release - the new release parameters. If null, the default value for the associated scheduler will be used.
memory - the new memory parameters. If null, the default value for the associated scheduler will be used.
Returns:
true iff the resulting system is feasible and the new release and memory parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the parameter values are not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if release or memory and this reside in memory areas whose objects cannot refer to one another (in both directions).
IllegalThreadStateException - If the old release parameters are periodic, the new release parameters are not periodic, and the schedulable object is currently blocked in waitForNextPeriod or waitForNextPeriodInterruptible.
Since:
RTSJ V1.0.1

setIfFeasible

boolean setIfFeasible(ReleaseParameters release,
                      MemoryParameters memory,
                      ProcessingGroupParameters group)

setIfFeasible performs a feasibility analysis using the provided release, memory, and processing group parameters. If the system remains feasible with these new parameters, the parameters are replaced.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
release - the new release parameters. If null, the default value for the associated scheduler will be used.
memory - the new memory parameters. If null, the default value for the associated scheduler will be used.
group - the new processing group parameters. If null, the default value for the associated scheduler will be used.
Returns:
true iff the resulting system is feasible and the new release, memory, and group parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the parameter values are not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if release, memory, or group and this reside in memory areas whose objects cannot refer to one another (in both directions).
IllegalThreadStateException - If the old release parameters are periodic, the new release parameters are not periodic, and the schedulable object is currently blocked in waitForNextPeriod or waitForNextPeriodInterruptible.
Since:
RTSJ V1.0.1

setIfFeasible

boolean setIfFeasible(ReleaseParameters release,
                      ProcessingGroupParameters group)

setIfFeasible performs a feasibility analysis using the provided release and processing group parameters. If the system remains feasible with these new parameters, the parameters are replaced.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
release - the new release parameters. If null, the default value for the associated scheduler will be used.
group - the new processing group parameters. If null, the default value for the associated scheduler will be used.
Returns:
true iff the resulting system is feasible and the new release and group parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the parameter values are not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if release or group and this reside in memory areas whose objects cannot refer to one another (in both directions).
IllegalThreadStateException - If the old release parameters are periodic, the new release parameters are not periodic, and the schedulable object is currently blocked in waitForNextPeriod or waitForNextPeriodInterruptible.
Since:
RTSJ V1.0.1

setIfFeasible

boolean setIfFeasible(SchedulingParameters sched,
                      ReleaseParameters release,
                      MemoryParameters memory)

setIfFeasible performs a feasibility analysis using the provided scheduling, release, and memory parameters. If the system remains feasible with these new parameters, the scheduling, release and memory parameters are replaced.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
sched - the new scheduling parameters. If null, the default value for the associated scheduler will be used. This default value may be null.
release - the new release parameters. If null, the default value for the associated scheduler will be used.
memory - the new memory parameters. If null, the default value for the associated scheduler will be used.
Returns:
true iff the resulting system is feasible and the new release and memory parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the parameter values are not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if sched, release or memory and this reside in memory areas whose objects cannot refer to one another (in both directions).
IllegalThreadStateException - If the old release parameters are periodic, the new release parameters are not periodic, and the schedulable object is currently blocked in waitForNextPeriod or waitForNextPeriodInterruptible.
Since:
RTSJ V1.0.1

setIfFeasible

boolean setIfFeasible(SchedulingParameters sched,
                      ReleaseParameters release,
                      MemoryParameters memory,
                      ProcessingGroupParameters group)

setIfFeasible performs a feasibility analysis using the provided scheduling, release, memory, and processing group parameters. If the system remains feasible with these new parameters, the scheduling, release, memory and processing group parameters are replaced.

If this object is not a member of the feasible set of the scheduler and the resulting system is feasible, this will be added to the set.

Parameters:
sched - the new scheduling parameters. If null, the default value for the associated scheduler will be used. This default value may be null.
release - the new release parameters. If null, the default value for the associated scheduler will be used.
memory - the new memory parameters. If null, the default value for the associated scheduler will be used.
group - the new processing group parameters. If null, the default value for the associated scheduler will be used.
Returns:
true iff the resulting system is feasible and the new scheduling, release, memory, and group parameters have been activated. false if the resulting system is not feasible, no changes are made in this case.
Throws:
IllegalArgumentException - if the parameter values are not compatible with the scheduler associated to this Schedulable.
IllegalAssignmentError - if sched, release, memory or group and this reside in memory areas whose objects cannot refer to one another (in both directions).
IllegalThreadStateException - If the old release parameters are periodic, the new release parameters are not periodic, and the schedulable object is currently blocked in waitForNextPeriod or waitForNextPeriodInterruptible.
Since:
RTSJ V1.0.1

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.