|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.realtime.AsyncEventHandler
javax.realtime.PooledAsyncEventHandler
| Field Summary | |
protected PooledExecutor |
executor
|
protected Runnable |
logic
|
| Constructor Summary | |
PooledAsyncEventHandler(SchedulingParameters schedulingParam,
ReleaseParameters releaseParam,
MemoryParameters memoryParam,
MemoryArea memoryArea,
ProcessingGroupParameters groupParam,
boolean noHeap,
Runnable logic,
PooledExecutor executor)
Creates a new PooledAsyncEventHandler instance with the
specified parameters. |
|
| Method Summary | |
boolean |
addIfFeasible()
Add to the feasibility of the already set scheduler if the resulting feasibility set 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. |
int |
executionEligibility()
|
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. |
void |
handleAsyncEvent()
Used by the asynchronous event mechanism, see AsyncEvent. |
protected void |
handleAsyncEventImpl()
If this handler was constructed using a separate Runnable logic object, then that Runnable object's run() method is called; This method will be
invoked repeatedly while fireCount is greater than
zero. |
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. |
void |
setMemoryParameters(MemoryParameters memoryParam)
Set the MemoryParameters for this schedulable object. |
boolean |
setMemoryParametersIfFeasible(MemoryParameters memoryParam)
Returns true if, after considering the value of the parameter, the task set would still be feasible. |
void |
setProcessingGroupParameters(ProcessingGroupParameters groupParam)
Set the ProcessingGroupParameters for this schedulable object. |
boolean |
setProcessingGroupParametersIfFeasible(ProcessingGroupParameters groupParam)
Set the ProcessingGroupParameters of this schedulable object
only if the resulting task set is feasible. |
void |
setReleaseParameters(ReleaseParameters releaseParam)
Set the ReleaseParametersfor this schedulable object. |
boolean |
setReleaseParametersIfFeasible(ReleaseParameters releaseParam)
Returns true if, after considering the value of the parameter, the task set would still be feasible. |
void |
setScheduler(Scheduler scheduler)
Set the Scheduler for this schedulable object. |
void |
setScheduler(Scheduler scheduler,
SchedulingParameters schedulingParam,
ReleaseParameters releaseParam,
MemoryParameters memoryParam,
ProcessingGroupParameters groupParam)
Set the Scheduler for this schedulable object. |
void |
setSchedulingParameters(SchedulingParameters schedulingParam)
Set the SchedulingParameters for this schedulable
object only if the resulting task set is feasible. |
boolean |
setSchedulingParametersIfFeasible(SchedulingParameters schedulingParam)
Set the SchedulingParameters for this schedulable object. |
| Methods inherited from class javax.realtime.AsyncEventHandler |
finalize, getMemoryArea, run, setDaemon, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected PooledExecutor executor
protected Runnable logic
| Constructor Detail |
public PooledAsyncEventHandler(SchedulingParameters schedulingParam,
ReleaseParameters releaseParam,
MemoryParameters memoryParam,
MemoryArea memoryArea,
ProcessingGroupParameters groupParam,
boolean noHeap,
Runnable logic,
PooledExecutor executor)
throws IllegalArgumentException
PooledAsyncEventHandler instance with the
specified parameters.
schedulingParam - a SchedulingParameters value
which will be associated with the constructed instance of this.
If null this will be assigned the reference to the
SchedulingParameters of the current thread.releaseParam - a ReleaseParameters value which
will be associated with the constructed instance of this. If
null this will have no ReleaseParameters.memoryParam - a MemoryParameters value which will
be associated with the constructed instance of this. If null
this will have no MemoryParameters.memoryArea - The MemoryArea for this PooledAsyncEventHandler. If null, inherit the current memory
area at the time of construction. The initial memory area must
be a reference to a ScopedMemory or ImmortalMemory object if noheap is true.groupParam - A ProcessingGroupParameters object to
which this will be associated. If null this will not be
associated with any processing group.noHeap - A flag meaning, when true, that this will
have characteristics identical to a NoHeapRealtimeThread. A false value means this will have
characteristics identical to a RealtimeThread. If
true and the current thread is not a NoHeapRealtimeThread or a RealtimeThread executing
within a ScopedMemory or ImmortalMemory scope
then an IllegalArgumentException is thrown.logic - The Runnable object whose run is
executed by handleAsyncEvent.
IllegalArgumentException| Method Detail |
protected void handleAsyncEventImpl()
Runnable object's run() method is called; This method will be
invoked repeatedly while fireCount is greater than
zero.
public void handleAsyncEvent()
AsyncEvent. This method invokes
handleAsyncEvent() repeatedly while the fire count
is greater than zero. Applications cannot override this method
and should thus override handleAsyncEvent() in
subclasses with the logic of the handler.
handleAsyncEvent in class AsyncEventHandlerpublic boolean addIfFeasible()
addIfFeasible in interface SchedulableaddIfFeasible in class AsyncEventHandlerpublic boolean addToFeasibility()
addToFeasibility in interface SchedulableaddToFeasibility in class AsyncEventHandlerpublic MemoryParameters getMemoryParameters()
MemoryParameters of this schedulable object.
getMemoryParameters in interface SchedulablegetMemoryParameters in class AsyncEventHandlerMemoryParameters value.public void setMemoryParameters(MemoryParameters memoryParam)
MemoryParameters for this schedulable object.
setMemoryParameters in interface SchedulablesetMemoryParameters in class AsyncEventHandlermemoryParam - the MemoryParameters for this
schedulable object.public boolean setMemoryParametersIfFeasible(MemoryParameters memoryParam)
setMemoryParametersIfFeasible in interface SchedulablesetMemoryParametersIfFeasible in class AsyncEventHandlermemoryParam - the MemoryParameters for this
schedulable object.
public ProcessingGroupParameters getProcessingGroupParameters()
ProcessingGroupParameters of this
schedulable object.
getProcessingGroupParameters in interface SchedulablegetProcessingGroupParameters in class AsyncEventHandlerProcessingGroupParameters valuepublic void setProcessingGroupParameters(ProcessingGroupParameters groupParam)
ProcessingGroupParameters for this schedulable object.
setProcessingGroupParameters in interface SchedulablesetProcessingGroupParameters in class AsyncEventHandlergroupParam - a ProcessingGroupParameters valuepublic boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters groupParam)
ProcessingGroupParameters of this schedulable object
only if the resulting task set is feasible.
setProcessingGroupParametersIfFeasible in interface SchedulablesetProcessingGroupParametersIfFeasible in class AsyncEventHandlergroupParam - a ProcessingGroupParameters value
public ReleaseParameters getReleaseParameters()
ReleaseParameters of this schedulable object.
getReleaseParameters in interface SchedulablegetReleaseParameters in class AsyncEventHandlerReleaseParameters valuepublic void setReleaseParameters(ReleaseParameters releaseParam)
ReleaseParametersfor this schedulable object.
setReleaseParameters in interface SchedulablesetReleaseParameters in class AsyncEventHandlerreleaseParam - a ReleaseParameters valuepublic boolean setReleaseParametersIfFeasible(ReleaseParameters releaseParam)
setReleaseParametersIfFeasible in interface SchedulablesetReleaseParametersIfFeasible in class AsyncEventHandlerreleaseParam - a ReleaseParameters valuepublic Scheduler getScheduler()
Scheduler for this schedulable object.
getScheduler in interface SchedulablegetScheduler in class AsyncEventHandlerScheduler value
public void setScheduler(Scheduler scheduler)
throws IllegalThreadStateException
Scheduler for this schedulable object.
setScheduler in interface SchedulablesetScheduler in class AsyncEventHandlerscheduler - the scheduler.
IllegalExecutorStateException
IllegalThreadStateException
public void setScheduler(Scheduler scheduler,
SchedulingParameters schedulingParam,
ReleaseParameters releaseParam,
MemoryParameters memoryParam,
ProcessingGroupParameters groupParam)
throws IllegalThreadStateException
Scheduler for this schedulable object.
setScheduler in interface SchedulablesetScheduler in class AsyncEventHandlerscheduler - a Scheduler valueschedulingParam - a SchedulingParameters valuereleaseParam - a ReleaseParameters valuememoryParam - a MemoryParameters valuegroupParam - a ProcessingGroupParameters value
IllegalExecutorStateException - if an error occurs
IllegalThreadStateExceptionpublic SchedulingParameters getSchedulingParameters()
SchedulingParameters for this schedulable object.
getSchedulingParameters in interface SchedulablegetSchedulingParameters in class AsyncEventHandlerSchedulingParameters valuepublic void setSchedulingParameters(SchedulingParameters schedulingParam)
SchedulingParameters for this schedulable
object only if the resulting task set is feasible.
setSchedulingParameters in interface SchedulablesetSchedulingParameters in class AsyncEventHandlerschedulingParam - a SchedulingParameters valuepublic boolean setSchedulingParametersIfFeasible(SchedulingParameters schedulingParam)
SchedulingParameters for this schedulable object.
setSchedulingParametersIfFeasible in interface SchedulablesetSchedulingParametersIfFeasible in class AsyncEventHandlerschedulingParam - a SchedulingParameters value
public boolean removeFromFeasibility()
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.
removeFromFeasibility in interface SchedulableremoveFromFeasibility in class AsyncEventHandlerpublic int executionEligibility()
executionEligibility in class AsyncEventHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||