public class AsyncEventHandler extends AsyncBaseEventHandler
AsyncEvent
to which it is attached
occurs.
It is guaranteed that multiple releases of an event handler will
be serialized. It is also guaranteed that (unless the handler
explicitly chooses otherwise) for each release of the handler, there
will be one execution of the handleAsyncEvent()
method. Control over the number of calls to
handleAsyncEvent()
is given by
methods which manipulate a fireCount
. These may be
called by the application via sub-classing and overriding handleAsyncEvent()
.
Instances of AsyncEventHandler
with a release
parameter of type SporadicParameters
or AperiodicParameters
have a list of release times which correspond to
the occurrence times of instances of AsyncEvent
to which they
are attached. The minimum interarrival time specified in SporadicParameters
is enforced when a release time is added to the
list. Unless the handler explicitly chooses otherwise, there will be
one execution of the code in handleAsyncEvent()
for each entry in the list.
The deadline and the time each release event causes the AEH to
become eligible for execution are properties of the scheduler that
controls the AEH. For the base scheduler,
the deadline for each release event is relative to its fire time, and
the release takes place at fire time but execution eligibility may be
deferred when the queue's MIT violation policy is SAVE
.
Handlers may do almost anything a realtime thread can do. They
may run for a long or short time, and they may block. (Note, blocked
handlers may hold system resources.) A handler may not use the
RealtimeThread.waitForNextRelease()
method.
Normally, handlers are bound to an execution context dynamically
when the instances of AsyncEvent
s to which they are bound
occur. This can introduce a (small) time penalty. For critical
handlers that cannot afford the expense, and where this penalty is a
problem, BoundAsyncEventHandler
s can be used.
The scheduler for an asynchronous event handler is inherited from
the task that created it. When created from a task that is not an
instance of Schedulable
, the scheduler is the current default
scheduler.
The semantics for memory areas that were defined for realtime threads apply
in the same way to instances of AsyncEventHandler
They may
inherit a scope stack when they are created, and the single parent rule
applies to the use of memory scopes for instances of
AsyncEventHandler
just as it does in realtime threads.
Constructor and Description |
---|
AsyncEventHandler()
Creates an instance of
AsyncEventHandler with default
values for all parameters. |
AsyncEventHandler(boolean nonheap)
Deprecated.
in version 2.0.
|
AsyncEventHandler(boolean nonheap,
java.lang.Runnable logic)
Deprecated.
in version 2.0.
|
AsyncEventHandler(java.lang.Runnable logic)
Calling this constructor is equivalent to calling
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ConfigurationParameters,
ReleaseRunner,
Runnable)
with arguments (null, null, null, null, null, null, logic) . |
AsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release)
Calling this constructor is equivalent to calling
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ConfigurationParameters,
ReleaseRunner,
Runnable)
with arguments (scheduling, release, null, null, null, null, null) |
AsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
ConfigurationParameters config,
ReleaseRunner runner,
java.lang.Runnable logic)
Creates a handler with the given scheduling, release, memory, group, and
configuration parameters to run the given logic.
|
AsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
ProcessingGroupParameters pgp,
boolean nonheap)
Deprecated.
in version 2.0.
|
AsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
ProcessingGroupParameters pgp,
boolean nonheap,
java.lang.Runnable logic)
Deprecated.
in version 2.0.
|
AsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
ProcessingGroupParameters pgp,
java.lang.Runnable logic)
Deprecated.
in version 2.0.
|
AsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
java.lang.Runnable logic)
Calling this constructor is equivalent to calling
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ConfigurationParameters,
ReleaseRunner,
Runnable)
with arguments (scheduling, release, memory, area, null, null, logic) . |
AsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
java.lang.Runnable logic)
Calling this constructor is equivalent to calling
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ConfigurationParameters,
ReleaseRunner,
Runnable)
with arguments (scheduling, release, null, null, null, null, logic) . |
Modifier and Type | Method and Description |
---|---|
boolean |
addIfFeasible()
Deprecated.
as of RTSJ 2.0, because the framework for feasibility
analysis is inadequate.
|
protected int |
getAndClearPendingFireCount()
This is an accessor method for
fireCount . |
protected int |
getAndDecrementPendingFireCount()
This is an accessor method for
fireCount . |
protected int |
getAndIncrementPendingFireCount()
Deprecated.
as of RTSJ 2.0 Use ae.fire()
|
protected int |
getPendingFireCount()
This is an accessor method for
fireCount . |
void |
handleAsyncEvent()
This method holds the logic which is to be executed when any
AsyncEvent with which this handler is associated is fired. |
void |
release()
Release this handler directly.
|
boolean |
setIfFeasible(ReleaseParameters<?> release,
MemoryParameters memory)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis is inadequate
|
boolean |
setIfFeasible(ReleaseParameters<?> release,
MemoryParameters memory,
ProcessingGroupParameters pgp)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis is
inadequate.
|
boolean |
setIfFeasible(ReleaseParameters<?> release,
ProcessingGroupParameters pgp)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis
is inadequate.
|
boolean |
setIfFeasible(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis is
inadequate.
|
boolean |
setIfFeasible(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
ProcessingGroupParameters pgp)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis is
inadequate.
|
boolean |
setMemoryParametersIfFeasible(MemoryParameters memory)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis
is inadequate
|
boolean |
setProcessingGroupParametersIfFeasible(ProcessingGroupParameters pgp)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis
is inadequate.
|
boolean |
setReleaseParametersIfFeasible(ReleaseParameters<?> release)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis is
inadequate.
|
void |
setScheduler(Scheduler scheduler,
SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memoryParameters,
ProcessingGroupParameters pgp)
Deprecated.
|
boolean |
setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
Deprecated.
as of RTSJ 2.0 The framework for feasibility analysis
is inadequate.
|
addToFeasibility, getConfigurationParameters, getCurrentReleaseTime, getCurrentReleaseTime, getMemoryArea, getMemoryParameters, getProcessingGroupParameters, getQueueLength, getReleaseParameters, getScheduler, getSchedulingParameters, isDaemon, mayUseHeap, removeFromFeasibility, run, setDaemon, setMemoryParameters, setProcessingGroupParameters, setReleaseParameters, setScheduler, setScheduler, setSchedulingParameters, subsumes
public AsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, ConfigurationParameters config, ReleaseRunner runner, java.lang.Runnable logic)
scheduling
- Parameter for scheduling the new handler
(and possibly other instances of Schedulable
). When
scheduling
is null
and the
creator is an instance of Schedulable
,
SchedulingParameters
is a clone of the creator's value
created in the same memory area as this
. When
scheduling
is null
and the creator is
a task that is not an instance of Schedulable
, the
contents and type of the new SchedulingParameters
object are governed by the associated scheduler.
The Affinity of the newly-created handler will be set as follow:
AsyncBaseEventHandler.setSchedulingParameters(SchedulingParameters)
,
the default affinity assigned to this Schedulable will not appear
in the SchedulingParameters
returned by
AsyncBaseEventHandler.getSchedulingParameters()
.release
- Parameter for scheduling the new handler
(and possibly other instances of Schedulable
). When
release
is null
the new
AsyncEventHandler
will use a clone of the
default ReleaseParameters
for the associated
scheduler created in the memory area that contains the
AsyncEventHandler
object.memory
- Parameter for scheduling the new handler
(and possibly other instances of Schedulable
). When
memory
is null
, the new
AsyncEventHandler
receives null
value
for its memory parameters, and the amount or rate of memory
allocation for the new handler is unrestricted.area
- The initial memory area of this handler.runner
- A pool of realtime threads to provide an execution context
for this handler.logic
- The Runnable
object whose
run()
method will serve as the logic for the
new AsyncEventHandler
. When logic
is null
, the handleAsyncEvent()
method in the new object will serve as its logic.public AsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, java.lang.Runnable logic)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ConfigurationParameters,
ReleaseRunner,
Runnable)
with arguments (scheduling, release, memory, area, null, null, logic)
.public AsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, java.lang.Runnable logic)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ConfigurationParameters,
ReleaseRunner,
Runnable)
with arguments (scheduling, release, null, null, null, null, logic)
.public AsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ConfigurationParameters,
ReleaseRunner,
Runnable)
with arguments (scheduling, release, null, null, null, null, null)
public AsyncEventHandler(java.lang.Runnable logic)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ConfigurationParameters,
ReleaseRunner,
Runnable)
with arguments (null, null, null, null, null, null, logic)
.public AsyncEventHandler()
AsyncEventHandler
with default
values for all parameters.@Deprecated public AsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters pgp, boolean nonheap, java.lang.Runnable logic)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ProcessingGroupParameters,
boolean,
Runnable)
with arguments (scheduling, release, memory, area, pgp, nonheap, logic)
.@Deprecated public AsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters pgp, java.lang.Runnable logic)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ProcessingGroupParameters,
boolean,
Runnable)
with arguments (scheduling, release, memory, area, pgp, false, logic)
.@Deprecated public AsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters pgp, boolean nonheap)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ProcessingGroupParameters,
boolean
Runnable)
with arguments (scheduling, release, memory, area, null, false, null)
.@Deprecated public AsyncEventHandler(boolean nonheap, java.lang.Runnable logic)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ProcessingGroupParameters,
boolean,
Runnable)
with arguments (null, null, null, null, null, nonheap, logic)
.@Deprecated public AsyncEventHandler(boolean nonheap)
AsyncEventHandler(SchedulingParameters,
ReleaseParameters,
MemoryParameters,
MemoryArea,
ProcessingGroupParameters,
boolean,
Runnable)
with arguments (null, null, null, null, null, nonheap, null)
.public void handleAsyncEvent()
AsyncEvent
with which this handler is associated is fired.
This method will be invoked repeatedly while fireCount
is
greater than zero.
The default implementation of this method invokes the run
method of any non-null logic
instance passed to the
constructor of this handler.
This AEH acts as a source of "reference" for its initial memory area while it is released.
All throwables from (or propagated through) handleAsyncEvent
are caught, a stack trace is printed and execution continues as if
handleAsyncEvent
had returned normally.
protected int getPendingFireCount()
AsyncBaseEventHandler
fireCount
. The
fireCount
field nominally holds the number of times
associated instances of AsyncEvent
have occurred that have
not had the method handleAsyncEvent()
invoked. It is
incremented and decremented by the implementation of the RTSJ. The
application logic may manipulate the value in this field for
application-specific reasons.getPendingFireCount
in class AsyncBaseEventHandler
fireCount
.protected int getAndDecrementPendingFireCount()
AsyncBaseEventHandler
fireCount
. This method
atomically decrements, by one, the value of fireCount
(when it is greater than zero) and returns the value from before the
decrement. This method can be used in the
handleAsyncEvent()
method to handle multiple releases:
public void handleAsyncEvent() { <setup> do { <handle the event> } while(getAndDecrementPendingFireCount() > 0); }
This construction is necessary only in cases where a handler
wishes to avoid the setup costs, since the framework guarantees that
handleAsyncEvent()
will be invoked whenever the
fireCount
is greater than zero. The effect of a call
to getAndDecrementPendingFireCount
on the scheduling
of this AEH depends on the semantics of the scheduler controlling
this AEH.
getAndDecrementPendingFireCount
in class AsyncBaseEventHandler
fireCount
prior to
decrementing it by one.protected int getAndClearPendingFireCount()
AsyncBaseEventHandler
fireCount
.
This method atomically sets the value of fireCount
to zero
and returns the value from before it was set to zero.
This may be used by handlers for which the logic can accommodate multiple
releases in a single execution.
The general form for using this is
public void handleAsyncEvent() { int numberOfReleases = getAndClearPendingFireCount(); <handle the events> }The effect of a call to
getAndClearPendingFireCount
on
the scheduling of this AEH depends on the semantics of the scheduler
controlling this AEH.getAndClearPendingFireCount
in class AsyncBaseEventHandler
fireCount
prior to setting
the value to zero.public void release()
@Deprecated protected int getAndIncrementPendingFireCount()
fireCount
.
This method atomically increments, by one, the value of
fireCount
and returns the value from before the
increment.
Calling this method is effectively the same as firing an event that is associated with this handler. When called from outside the handler's control flow, call it is effectively the same as firing an event that is associated with this handler, except that it does not constitute a release event.
fireCount
prior to
incrementing it by one.MITViolationException
- when this AEH is controlled by
sporadic scheduling parameters under the base scheduler,
the parameters specify the mitViolationExcept
policy, and this method would introduce a release that
would violate the specified minimum interarrival time.ArrivalTimeQueueOverflowException
- when this AEH is
controlled by aperiodic scheduling parameters under the
base scheduler, the release parameters specify the
arrivalTimeQueueOverflowExcept
policy, and
this method would cause the arrival time queue to overflow.@Deprecated public void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memoryParameters, ProcessingGroupParameters pgp)
scheduler
.scheduler
- A reference to the scheduler that will manage the
execution of this schedulable. Null
is
not a permissible value.scheduling
- A reference to the SchedulingParameters
which will be associated with this
. When
null
, the default value is governed by
scheduler
; a new object is created when the
default value is not null
. (See PriorityScheduler
.)release
- A reference to the ReleaseParameters
which
will be associated with this
. When
null
, the default value is governed by
scheduler
; a new object is created when the
default value is not null
. (See PriorityScheduler
.)memoryParameters
- A reference to the MemoryParameters
which will be associated with this
. When
null
, the default value is governed by
scheduler
; a new object is created when the default
value is not null
. (See PriorityScheduler
.)pgp
- The processing group parameters to use. When
null
, the default value is governed by the
associated scheduler (a new object is created when the default
value is not null
). (See PriorityScheduler
.)StaticIllegalArgumentException
- when scheduler
is null
or the parameter values are not
compatible with scheduler
. Also thrown when
this schedulable may not use the heap and
scheduler
, scheduling
release
, memoryParameters
, or
group
is located in heap memory.IllegalAssignmentError
- when this
object cannot
hold references to all the parameter objects or the
parameters cannot hold references to this
.StaticSecurityException
- when the caller is not permitted to set
the scheduler for this schedulable.@Deprecated public boolean addIfFeasible()
this
added to the system. When the resulting system is feasible,
informs the scheduler and cooperating facilities that this
instance of Schedulable
should be considered in
feasibility analysis until further notified. When the analysis shows
that the system including this
would not be feasible,
this method does not admit this
to the feasibility set.
When the object is already included in the feasibility set, does nothing.
true
when inclusion of this
in the feasibility
set yields a feasible system, and false
otherwise. When true
is returned then
this
is known to be in the
feasibility set. When false is returned,
this
was not added to the
feasibility set, but it may already have been
present.@Deprecated public boolean setIfFeasible(ReleaseParameters<?> release, MemoryParameters memory)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
release
- The release parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)memory
- The memory parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)true
, when the resulting system is feasible and the changes
are made. False, when the resulting system is not feasible
and no changes are made.StaticIllegalArgumentException
- when the parameter values
are not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and any of the
specified parameter objects are located in heap memory.IllegalAssignmentError
- when this
cannot hold
references to the specified parameter objects, or the
parameter objects cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits this parameter change at this time due
to the state of the schedulable.Schedulable
interface.@Deprecated public boolean setIfFeasible(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
scheduling
- The scheduling parameters to use. When null
, the default value is governed by the associated
scheduler (a new object is created when the default value
is not null
). (See PriorityScheduler
.)release
- The release parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not
null
). (See PriorityScheduler
.)memory
- The memory parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not
null
). (See PriorityScheduler
.)true
, when the resulting system is feasible and
the changes are made. False, when the resulting system
is not feasible and no changes are made.StaticIllegalArgumentException
- when the parameter values
are not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and any
of the specified parameter objects are located in heap
memory.IllegalAssignmentError
- when this
cannot hold
references to the specified parameter objects, or the
parameter objects cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits this parameter change at this time due
to the state of the schedulable.@Deprecated public boolean setIfFeasible(ReleaseParameters<?> release, MemoryParameters memory, ProcessingGroupParameters pgp)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
release
- The release parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)memory
- The memory parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)release
- The release parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not
null
). (See PriorityScheduler
.)memory
- The memory parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not
null
). (See PriorityScheduler
.)pgp
- The processing group parameters to use. When
null
, the default value is governed by the
associated scheduler (a new object is created when the default
value is not null
). (See PriorityScheduler
.)true
, when the resulting system is feasible and
the changes are made, or false
, when the resulting
system is not feasible and no changes are made.StaticIllegalArgumentException
- when the parameter values
are not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and any of the
specified parameter objects are located in heap memory.IllegalAssignmentError
- when this
cannot hold
references to the specified parameter objects, or the
parameter objects cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits this parameter change at this time due
to the state of the schedulable.Schedulable
interface.@Deprecated public boolean setIfFeasible(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, ProcessingGroupParameters pgp)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
scheduling
- The scheduling parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)release
- The release parameters to use . When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)memory
- The memory parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)pgp
- The processing group parameters to use. When
null
, the default value is governed by the associated
scheduler (a new object is created when the default value is not
null
). (See PriorityScheduler
.)true
, when the resulting system is feasible and the changes
are made. False, when the resulting system is not feasible
and no changes are made.StaticIllegalArgumentException
- when the parameter values
are not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and any of the
specified parameter objects are located in heap memory.IllegalAssignmentError
- when this
cannot hold
references to the specified parameter objects, or the
parameter objects cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits this parameter change at this time due
to the state of the schedulable.@Deprecated public boolean setReleaseParametersIfFeasible(ReleaseParameters<?> release)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
release
- The release parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)true
, when the resulting system is feasible and the changes
are made. False, when the resulting system is not feasible
and no changes are made.StaticIllegalArgumentException
- when the parameter value is
not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and the
specified parameter object is located in heap memory.IllegalAssignmentError
- when this
cannot hold a
reference to the specified parameter object, or the
parameter object cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits the changing of the release parameter
at this time due to the state of the schedulable.@Deprecated public boolean setIfFeasible(ReleaseParameters<?> release, ProcessingGroupParameters pgp)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
release
- The release parameters to use. When
null
, the default value is governed by the
associated scheduler (a new object is created when the default
value is not null
). (See PriorityScheduler
.)pgp
- The processing group parameters to use. When
null
, the default value is governed by the
associated scheduler (a new object is created when the default
value is not null
). (See PriorityScheduler
.)true
, when the resulting system is feasible and the changes
are made. False, when the resulting system is not feasible
and no changes are made.StaticIllegalArgumentException
- when the parameter values
are not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and any of the
specified parameter objects are located in heap memory.IllegalAssignmentError
- when this
cannot hold
references to the specified parameter objects, or the
parameter objects cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits this parameter change at this time due
to the state of the schedulable.Schedulable
interface.@Deprecated public boolean setMemoryParametersIfFeasible(MemoryParameters memory)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
memory
- The memory parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)true
, when the resulting system is feasible and the changes
are made. False, when the resulting system is not feasible
and no changes are made.StaticIllegalArgumentException
- when the parameter value is
not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and the
specified parameter object is located in heap memory.IllegalAssignmentError
- when this
cannot hold a
reference to the specified parameter object, or the
parameter object cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits the changing of the memory parameter at
this time due to the state of the schedulable.@Deprecated public boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
scheduling
- The scheduling parameters to use. When null
,
the default value is governed by the associated scheduler
(a new object is created when the default value is not null
).
(See PriorityScheduler
.)true
, when the resulting system is feasible and
the changes are made. False, when the resulting system
is not feasible and no changes are made.StaticIllegalArgumentException
- when the parameter value is
not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and the
specified parameter object is located in heap memory.IllegalAssignmentError
- when this
cannot hold a
reference to the specified parameter object, or the
parameter object cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits the changing of the scheduling
parameter at this time due to the state of the schedulable
object.@Deprecated public boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters pgp)
this
. When 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. For instance, the change may be immediate or it may be delayed until the next release of the schedulable. See the documentation for the scheduler for details.
This method does not require that the schedulable be in the feasibility set before it is called. When it is not initially a member of the feasibility set it will be added when the resulting system is feasible.
pgp
- The processing group parameters to use. When
null
, the default value is governed by the
associated scheduler (a new object is created when the default
value is not null
). (See PriorityScheduler
.)true
, when the resulting system is feasible and the changes
are made. False, when the resulting system is not feasible
and no changes are made.StaticIllegalArgumentException
- when the parameter value is
not compatible with the schedulable's scheduler.
Also when this schedulable may not use the heap and the
specified parameter object is located in heap memory.IllegalAssignmentError
- when this
cannot hold a
reference to the specified parameter object, or the
parameter object cannot hold a reference to this
.java.lang.IllegalThreadStateException
- when the schedulable's
scheduler prohibits the changing of the processing group
parameter at this time due to the state of the schedulable
object.