public class BoundAsyncEventHandler extends AsyncEventHandler implements BoundSchedulable
An instance of this class behaves exactly as an instance of AsyncEventHandler, with the only difference being that this instance will have its own instance of RealtimeThread or NoHeapRealtimeThread associated to it.
An instance of BoundAsyncEventHandler should be used in preference to a normal AsyncEventHandler if the added timeliness by not sharing a thread with other handlers is required. A handler that may block should be of this class since it might otherwise prevent the execution of other AsyncEventHandlers that may require the same shared thread.
As long as all handlers with equal priority parameters do not block during their execution, there is no need to use BoundAsyncEventHandler for this since several threads of the same priority might block one another.
| Constructor and Description |
|---|
BoundAsyncEventHandler()
Constructor to create an instance of BoundAsyncEventHandler with
default parameters.
|
BoundAsyncEventHandler(Runnable logic)
Creates an instance of
BoundAsyncEventHandler with the
specified parameters. |
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release)
Creates an instance of
BoundAsyncEventHandler with the
specified parameters. |
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
ProcessingGroupParameters pgp,
boolean nonheap,
Runnable logic)
Constructor to create an instance of BoundAsyncEventHandler with the
given scheduling, release, memory, memory area, processing group,
nonheap, and logic parameters.
|
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
RealtimeThreadGroup group,
ConfigurationParameters config,
Runnable logic)
Creates an instance of
BoundAsyncEventHandler (BAEH) with the
specified parameters. |
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
Runnable logic)
Creates an instance of
BoundAsyncEventHandler with the
specified parameters. |
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
Runnable logic)
Creates an instance of
BoundAsyncEventHandler with the
specified parameters. |
| Modifier and Type | Method and Description |
|---|---|
ConfigurationParameters |
getConfigurationParameters()
Obtain the configuration parameters.
|
addIfFeasible, getAndIncrementPendingFireCount, handleAsyncEvent, release, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setMemoryParametersIfFeasible, setProcessingGroupParametersIfFeasible, setReleaseParameters, setReleaseParametersIfFeasible, setScheduleraddToFeasibility, getAndClearPendingFireCount, getAndDecrementPendingFireCount, getCurrentReleaseTime, getCurrentReleaseTime, getDispatcher, getMemoryArea, getMemoryParameters, getPendingFireCount, getProcessingGroupParameters, getQueueLength, getReleaseParameters, getReleaseRunner, getScheduler, getSchedulingParameters, isDaemon, mayUseHeap, removeFromFeasibility, run, setDaemon, setMemoryParameters, setProcessingGroupParameters, setScheduler, setScheduler, setSchedulingParameters, setSchedulingParametersIfFeasible, subsumesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddToFeasibility, getMemoryParameters, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, isDaemon, mayUseHeap, removeFromFeasibility, setDaemon, setMemoryParameters, setProcessingGroupParameters, setReleaseParameters, setScheduler, setScheduler, setSchedulingParameters, subsumesgetDispatcherpublic BoundAsyncEventHandler()
public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters pgp, boolean nonheap, Runnable logic)
StaticIllegalArgumentException - iff scheduling or release
parameters are not compatible with the default scheduler, i.e.,
iff they are non-null and not an instance of PriorityParameters
or PeriodicParameters, AperiodicParameters and
SporadicParameters, respectively.IllegalAssignmentError - if scheduling, release, memory,
area, group, or logic 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.scheduling - SchedulingParameters to be associated with the new
AsyncEventHandler. This can be shared with several Schedulable
objects. If it is null, a copy of the creator's value will be
created in the same memory area as this AEH object. If it is null
and the current thread is a normal Java thread, the scheduling
parameters will be set to the default priority.release - ReleaseParameters to be associated with the new
AsyncEventHandler. This can be shared with several Schedulable
objects. If it is null, default release parameters will be used.memory - MemoryParameters to be associated with new
thread. May be null for unrestricted amount and rate of memory
allocation for the new AEH.area - MemoryArea to be used by the new AEH. If it is null,
the current memory area of the calling thread will be used.pgp - ProcessingGroupParameters to be associated with
this. This can be shared with several Schedulable objects. If it
is null, this will not be associated with any processing group.nonheap - true to create an AsyncEventHandler that runs in a
NoHeapRealtimeThread.logic - Runnable to be used as the logic for this. If is is
null, the run() method in this new AsyncEventHandler object will be
called when the thread is started.public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, RealtimeThreadGroup group, ConfigurationParameters config, Runnable logic)
BoundAsyncEventHandler (BAEH) with the
specified parameters.ProcessorAffinityException - when the affinity in
SchedulingParameters is invalid or not a subset of
this group's affinity.StaticIllegalArgumentException - when config is of type
ScopedConfigurationParameters
and logic, any parameter object, or this is
in heap memory.IllegalAssignmentError - when the new AsyncEventHandler
instance cannot hold a reference to any value assigned to
one of the scheduling, release, memory,
or group parameters, or when those parameters
cannot hold a reference to the new AsyncEventHandler.
Also when the new AsyncEventHandler instance cannot
hold a reference to values assigned to area or
logic.scheduling - A SchedulingParameters object which will
be associated with the constructed instance. When
null, and the creator is not an instance of
Schedulable, a SchedulingParameters object is
created which has the default SchedulingParameters
for the scheduler associated with the current thread. When
null, and the creator is an instance of
Schedulable, the SchedulingParameters are
inherited from the current schedulable (a new
SchedulingParameters object is cloned). The
Affinity of the newly-created handler will be set as follows:
AsyncBaseEventHandler.setSchedulingParameters(SchedulingParameters),
the default affinity assigned to this Schedulable will not
appear in the SchedulingParameters returned by
AsyncBaseEventHandler.getSchedulingParameters().release - A ReleaseParameters object which will be
associated with the constructed instance. When
null, this will have default
ReleaseParameters for the BAEH's scheduler.memory - A MemoryParameters object which will be
associated with the constructed instance. When
null, this will have no
MemoryParameters and the handler can access the heap.area - The MemoryArea for this. When
null, the memory area will be that of the
current thread/schedulable.group - A RealtimeThreadGroup object which will
be associated with the constructed instance. When
null, this will be
associated with the creating thread's realtime thread group.config - The ConfigurationParameters associated with
this (and possibly other instances of Schedulable.
When config is null, this
BoundAsyncEventHandler will reserve no space for
preallocated exceptions and implementation-specific values
will be set to their implementation-defined defaults.logic - The Runnable object whose run() method is
executed by AsyncEventHandler.handleAsyncEvent(). When
null, the default handleAsyncEvent() method
invokes nothing.public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release)
BoundAsyncEventHandler with the
specified parameters.
Equivalent to BoundAsyncEventHandler(scheduling, release,
null, null, null, null, null)
public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, Runnable logic)
BoundAsyncEventHandler with the
specified parameters.
Equivalent to BoundAsyncEventHandler(scheduling, release,
null, null, null, null, logic)
public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, Runnable logic)
BoundAsyncEventHandler with the
specified parameters.
Equivalent to BoundAsyncEventHandler(scheduling, release,
memory, area, null, null, logic)
public BoundAsyncEventHandler(Runnable logic)
BoundAsyncEventHandler with the
specified parameters.
Equivalent to BoundAsyncEventHandler(null, null, null, null,
null, null, logic)
public ConfigurationParameters getConfigurationParameters()
AsyncBaseEventHandlergetConfigurationParameters in interface SchedulablegetConfigurationParameters in class AsyncBaseEventHandleraicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2024 aicas GmbH. All Rights Reserved.