lejos.realtime
Interface Schedulable

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

public interface Schedulable
extends 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.

Author:
Benoit Bousquet

Method Summary
 boolean addIfFeasible()
           
 boolean addToFeasibility()
          This method first performs a feasibility analysis with this added to the system.
 MemoryParameters getMemoryParameters()
           
 ProcessingGroupParameters getProcessingGroupParameters()
           
 ReleaseParameters getReleaseParameters()
           
 Scheduler getScheduler()
           
 SchedulingParameters getSchedulingParameters()
           
 boolean removeFromFeasibility()
           
 boolean setIfFeasible(ReleaseParameters release, MemoryParameters memory)
           
 boolean setIfFeasible(ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
           
 boolean setIfFeasible(ReleaseParameters release, ProcessingGroupParameters group)
           
 boolean setIfFeasible(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory)
           
 boolean setIfFeasible(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
           
 void setMemoryParameters(MemoryParameters memory)
           
 boolean setMemoryParametersIfFeasible(MemoryParameters memory)
           
 void setProcessingGroupParameters(ProcessingGroupParameters group)
           
 boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters group)
           
 void setReleaseParameters(ReleaseParameters release)
          Sets the release parameters associated with this instance of Schedulable.
 boolean setReleaseParametersIfFeasible(ReleaseParameters release)
           
 void setScheduler(Scheduler scheduler)
           
 void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memoryParameters, ProcessingGroupParameters group)
           
 void setSchedulingParameters(SchedulingParameters scheduling)
          Sets the scheduling parameters associated with this instance of Schedulable.
 boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
           
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

setReleaseParameters

void setReleaseParameters(ReleaseParameters release)
                          throws IllegalArgumentException,
                                 IllegalStateException
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:
IllegalArgumentException - Never throwed for the moment.
java.lang.IllegalThreadStateException - Never throwed for the moment.
IllegalStateException

setSchedulingParameters

void setSchedulingParameters(SchedulingParameters scheduling)
                             throws IllegalArgumentException,
                                    IllegalAssignmentError
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:
IllegalArgumentException - Never throwed for the moment.
IllegalAssignmentError - Never throwed for the moment.

addIfFeasible

boolean addIfFeasible()

addToFeasibility

boolean addToFeasibility()
This method first performs a feasibility analysis with this added to the system.


getMemoryParameters

MemoryParameters getMemoryParameters()

getProcessingGroupParameters

ProcessingGroupParameters getProcessingGroupParameters()

getReleaseParameters

ReleaseParameters getReleaseParameters()

getScheduler

Scheduler getScheduler()

getSchedulingParameters

SchedulingParameters getSchedulingParameters()

removeFromFeasibility

boolean removeFromFeasibility()

setIfFeasible

boolean setIfFeasible(ReleaseParameters release,
                      MemoryParameters memory)

setIfFeasible

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

setIfFeasible

boolean setIfFeasible(ReleaseParameters release,
                      ProcessingGroupParameters group)

setIfFeasible

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

setIfFeasible

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

setMemoryParameters

void setMemoryParameters(MemoryParameters memory)

setMemoryParametersIfFeasible

boolean setMemoryParametersIfFeasible(MemoryParameters memory)

setProcessingGroupParameters

void setProcessingGroupParameters(ProcessingGroupParameters group)

setProcessingGroupParametersIfFeasible

boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters group)

setReleaseParametersIfFeasible

boolean setReleaseParametersIfFeasible(ReleaseParameters release)

setScheduler

void setScheduler(Scheduler scheduler)

setScheduler

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

setSchedulingParametersIfFeasible

boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)