javax.realtime
Interface Schedulable

All Superinterfaces:
Runnable
All Known Subinterfaces:
Executor
All Known Implementing Classes:
AsyncEventHandler, PooledExecutor, RealtimeThread, ThreadBoundExecutor, ThreadedExecutor

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:
Angelo Corsaro, Morgan Deters

Method Summary
 boolean addIfFeasible()
          Add to the feasibility of the associated scheduler if the resulting feasibility is Schedulable.
 boolean addToFeasibility()
          Inform the scheduler and cooperating facilities that the resource demands (as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters) of this instance of Schedulable will be considered in the feasibility analysis of the associated Scheduler until further notice.
 MemoryParameters getMemoryParameters()
          Get the MemoryParameters of this Schedulable object.
 ProcessingGroupParameters getProcessingGroupParameters()
          Get the ProcessingGroupParameters of this Schedulable object.
 ReleaseParameters getReleaseParameters()
          Get the ReleaseParameters of this Schedulable object.
 Scheduler getScheduler()
          Get the Scheduler for this Schedulable object.
 SchedulingParameters getSchedulingParameters()
          Get the SchedulingParameters for this Schedulable object.
 boolean removeFromFeasibility()
          Inform the scheduler and cooperating facilities that the resource demands, as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters, of this instance of Schedulable should no longer be considered in the feasibility analysis of the associated Scheduler.
 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)
          Set the MemoryParameters for this Schedulable object.
 boolean setMemoryParametersIfFeasible(MemoryParameters memory)
          Set the MemoryParameters for this Schedulable object.
 void setProcessingGroupParameters(ProcessingGroupParameters group)
          Set the ProcessingGroupParameters for this Schedulable object.
 boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters group)
          Set the ProcessingGroupParameters of this Schedulable object only if the resulting task set is feasible.
 void setReleaseParameters(ReleaseParameters release)
          Set the ReleaseParameters for this Schedulable object.
 boolean setReleaseParametersIfFeasible(ReleaseParameters release)
          Set the ReleaseParameters for this Schedulable object only if the resulting task set is feasible.
 void setScheduler(Scheduler scheduler)
          Set the Scheduler for this Schedulable object.
 void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, ProcessingGroupParameters group)
          Set the Scheduler for this Schedulable object.
 void setSchedulingParameters(SchedulingParameters scheduling)
          Set the SchedulingParameters for this Schedulable object only if the resulting task set is feasible.
 boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
          Set the SchedulingParameters for this Schedulable object.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

addIfFeasible

public boolean addIfFeasible()
Add to the feasibility of the associated scheduler if the resulting feasibility is Schedulable. If successful return true, if not return false. If there is not assigned scheduler false is returned.

Returns:
true if the resulting scheduler is feasible.

addToFeasibility

public boolean addToFeasibility()
Inform the scheduler and cooperating facilities that the resource demands (as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters) of this instance of Schedulable will be considered in the feasibility analysis of the associated Scheduler until further notice. Whether the resulting system is feasible or not, the addition is completed.

Returns:
true if the resulting system is feasible

getMemoryParameters

public MemoryParameters getMemoryParameters()
Get the MemoryParameters of this Schedulable object.

Returns:
a MemoryParameters value

setMemoryParameters

public void setMemoryParameters(MemoryParameters memory)
Set the MemoryParameters for this Schedulable object.

Parameters:
memory - the MemoryParameters for this Schedulable object

setMemoryParametersIfFeasible

public boolean setMemoryParametersIfFeasible(MemoryParameters memory)
Set the MemoryParameters for this Schedulable object.

Parameters:
memory - the MemoryParameters for this Schedulable object
Returns:
true if the requested change keeps the system feasible

getProcessingGroupParameters

public ProcessingGroupParameters getProcessingGroupParameters()
Get the ProcessingGroupParameters of this Schedulable object.

Returns:
a ProcessingGroupParameters value

setProcessingGroupParameters

public void setProcessingGroupParameters(ProcessingGroupParameters group)
Set the ProcessingGroupParameters for this Schedulable object.

Parameters:
group - a ProcessingGroupParameters value

setProcessingGroupParametersIfFeasible

public boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters group)
Set the ProcessingGroupParameters of this Schedulable object only if the resulting task set is feasible.

Parameters:
group - a ProcessingGroupParameters value
Returns:
true if, after considering the values of the parameters, the task set would still be feasible. In this case the values of the parameters are changed; false if, after considering the values of the parameters, the task set would not be feasible (in which case the values of the parameters are not changed)

getReleaseParameters

public ReleaseParameters getReleaseParameters()
Get the ReleaseParameters of this Schedulable object.

Returns:
a ReleaseParameters value

setReleaseParameters

public void setReleaseParameters(ReleaseParameters release)
Set the ReleaseParameters for this Schedulable object.

Parameters:
release - a ReleaseParameters value

setReleaseParametersIfFeasible

public boolean setReleaseParametersIfFeasible(ReleaseParameters release)
Set the ReleaseParameters for this Schedulable object only if the resulting task set is feasible.

Parameters:
release - a ReleaseParameters value

getScheduler

public Scheduler getScheduler()
Get the Scheduler for this Schedulable object.

Returns:
a Scheduler value

setScheduler

public void setScheduler(Scheduler scheduler)
Set the Scheduler for this Schedulable object.

Parameters:
scheduler - the scheduler.

setScheduler

public void setScheduler(Scheduler scheduler,
                         SchedulingParameters scheduling,
                         ReleaseParameters release,
                         MemoryParameters memory,
                         ProcessingGroupParameters group)
Set the Scheduler for this Schedulable object.

Parameters:
scheduler - a Scheduler value
scheduling - a SchedulingParameters value
release - a ReleaseParameters value
memory - a MemoryParameters value
group - a ProcessingGroupParameters value

getSchedulingParameters

public SchedulingParameters getSchedulingParameters()
Get the SchedulingParameters for this Schedulable object.

Returns:
a SchedulingParameters value

setSchedulingParameters

public void setSchedulingParameters(SchedulingParameters scheduling)
Set the SchedulingParameters for this Schedulable object only if the resulting task set is feasible.

Parameters:
scheduling - a SchedulingParameters value

setSchedulingParametersIfFeasible

public boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
Set the SchedulingParameters for this Schedulable object.

Parameters:
scheduling - a SchedulingParameters value
Returns:
true if the change was feasible, false otherwise

removeFromFeasibility

public boolean removeFromFeasibility()
Inform the scheduler and cooperating facilities that the resource demands, as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters, of this instance of Schedulable should no longer be considered in the feasibility analysis of the associated Scheduler. Whether the resulting system is feasible or not, the subtrac-tion is completed.

Returns:
true If the resulting system is feasible.

setIfFeasible

public boolean setIfFeasible(ReleaseParameters release,
                             MemoryParameters memory)

setIfFeasible

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

setIfFeasible

public boolean setIfFeasible(ReleaseParameters release,
                             ProcessingGroupParameters group)

setIfFeasible

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

setIfFeasible

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


jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2006 Angelo Corsaro and Morgan Deters.