public interface Schedulable extends Runnable, Timable, Subsumable<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 AsyncBaseEventHandler.
Modifier and Type | Method and Description |
---|---|
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.
|
ConfigurationParameters |
getConfigurationParameters()
Obtain the configuration parameters.
|
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 |
isDaemon()
Tests if this event handler is a daemon handler.
|
boolean |
mayUseHeap()
Determines whether or not this
schedulable may use the heap. |
boolean |
removeFromFeasibility()
removeFromFeasibility informs the scheduler associated with this
AsyncBaseEventHandler that this
AsyncBaseEventHandler should no longer be taken into account
in the feasibility analysis. |
void |
setDaemon(boolean on)
Marks this schedulable as either a daemon or a user task.
|
Schedulable |
setMemoryParameters(MemoryParameters memory)
setMemoryParameters replaces the memory parameters for this
Schedulable with the parameters provided.
|
void |
setProcessingGroupParameters(ProcessingGroupParameters groupParameters)
setProcessingGroupParameters sets the processing group parameters
of this Scheduling.
|
Schedulable |
setReleaseParameters(ReleaseParameters<?> release)
setReleaseParameters replaces the release parameters for this
Schedulable with the parameters provided.
|
Schedulable |
setScheduler(Scheduler scheduler)
setScheduler sets the scheduler for this Schedulable.
|
Schedulable |
setScheduler(Scheduler scheduler,
SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memoryParameters)
setScheduler set the scheduler and scheduling, release, memory
and processing group parameters for this Schedulable.
|
Schedulable |
setSchedulingParameters(SchedulingParameters scheduling)
setSchedulingParameters sets the scheduling parameters for this
Schedulable.
|
boolean |
subsumes(Schedulable other)
Determine whether or not this instance of
Schedulable is
more eligible than other . |
getDispatcher
boolean subsumes(Schedulable other)
Schedulable
is
more eligible than other
. On multicore systems, this only
gives a partial ordering over all schedulables. Schedulables with
disjoint processor affinity do not subsume one another.subsumes
in interface Subsumable<Schedulable>
other
- The object to be compared with.true
when and only when this instance of
Schedulable
is more eligible than other
.void setDaemon(boolean on)
IllegalThreadStateException
- when this schedulable is active.StaticSecurityException
- when the current schedulable
cannot modify this event handler.on
- When true
, marks this event handler as a daemon handler.boolean isDaemon()
true
when this event handler is a daemon handler;
false
otherwise.boolean mayUseHeap()
schedulable
may use the heap.true
only when this Schedulable
may allocate
on the heap and may enter the Heap
.ConfigurationParameters getConfigurationParameters()
MemoryParameters getMemoryParameters()
ReleaseParameters<?> getReleaseParameters()
Scheduler getScheduler()
SchedulingParameters getSchedulingParameters()
ProcessingGroupParameters getProcessingGroupParameters()
Schedulable setMemoryParameters(MemoryParameters memory)
This change may change the feasibility of the current feasible set of this Schedulable's scheduler.
In JamaicaVM, this change becomes effective immediately.
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).memory
- the new memory parameters. If null, the default
value for the associated scheduler will be used.Schedulable setReleaseParameters(ReleaseParameters<?> release)
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.
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.release
- the new release parameters. If null, the default
value for the associated scheduler will be used.Schedulable setScheduler(Scheduler scheduler)
This change may change the feasibility of the current feasible set of this Schedulable's scheduler.
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.scheduler
- the new scheduler to be used. Must not be null.Schedulable setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memoryParameters)
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.
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.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.Schedulable setSchedulingParameters(SchedulingParameters scheduling)
In JamaicaVM, this change of scheduling parameters becomes effective immediately for the default PriorityScheduler.
StaticIllegalArgumentException
- 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).scheduling
- the new scheduling parameters.void setProcessingGroupParameters(ProcessingGroupParameters groupParameters)
In JamaicaVM, this change becomes effective immediately.
This change may change the feasibility of the current feasible set of this Schedulable's scheduler.
IllegalArgumentException
- if the group argument is not
compatible with the scheduler of this RealtimeThread.groupParameters
- the new processing group parameters to be applied
for the next release of this. If null, use the default value for
the scheduler.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 feasibility analysis, do nothing.
boolean removeFromFeasibility()
AsyncBaseEventHandler
that this
AsyncBaseEventHandler
should no longer be taken into account
in the feasibility analysis.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2024 aicas GmbH. All Rights Reserved.