public class BoundAsyncEventHandler extends AsyncEventHandler implements BoundSchedulable
AsyncEventHandler that is permanently bound to a dedicated realtime
thread. Bound asynchronous event handlers are for use in situations
where the added timeliness is worth the overhead of dedicating an
individual realtime thread to the handler. Individual server
realtime threads can only be dedicated to a single bound event
handler.| Constructor and Description |
|---|
BoundAsyncEventHandler()
Creates an instance of
BoundAsyncEventHandler. |
BoundAsyncEventHandler(java.lang.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 group,
boolean nonheap,
java.lang.Runnable logic)
Deprecated.
|
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
RealtimeThreadGroup group,
ConfigurationParameters config,
java.lang.Runnable logic)
Creates an instance of
BoundAsyncEventHandler (BAEH) with the
specified parameters. |
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
java.lang.Runnable logic)
Creates an instance of
BoundAsyncEventHandler with the
specified parameters. |
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
java.lang.Runnable logic)
Creates an instance of
BoundAsyncEventHandler with the
specified parameters. |
addIfFeasible, getAndIncrementPendingFireCount, handleAsyncEvent, release, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setMemoryParametersIfFeasible, setProcessingGroupParametersIfFeasible, setReleaseParametersIfFeasible, setScheduler, setSchedulingParametersIfFeasibleaddToFeasibility, getAndClearPendingFireCount, getAndDecrementPendingFireCount, getConfigurationParameters, getCurrentReleaseTime, getCurrentReleaseTime, getMemoryArea, getMemoryParameters, getPendingFireCount, getProcessingGroupParameters, getQueueLength, getReleaseParameters, getReleaseRunner, getScheduler, getSchedulingParameters, isArmed, isDaemon, mayUseHeap, removeFromFeasibility, run, setDaemon, setMemoryParameters, setProcessingGroupParameters, setReleaseParameters, setScheduler, setScheduler, setSchedulingParameters, subsumesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddToFeasibility, getConfigurationParameters, getMemoryParameters, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, isDaemon, mayUseHeap, removeFromFeasibility, setDaemon, setMemoryParameters, setProcessingGroupParameters, setReleaseParameters, setScheduler, setScheduler, setSchedulingParameters, subsumespublic BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, RealtimeThreadGroup group, ConfigurationParameters config, java.lang.Runnable logic)
BoundAsyncEventHandler (BAEH) with the
specified parameters.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.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.public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, java.lang.Runnable logic)
BoundAsyncEventHandler with the
specified parameters.
Equivalent to BoundAsyncEventHandler(scheduling, release,
memory, area, null, null, logic)
public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, java.lang.Runnable logic)
BoundAsyncEventHandler with the
specified parameters.
Equivalent to BoundAsyncEventHandler(scheduling, release, null, null, null, null, logic)
public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release)
BoundAsyncEventHandler with the
specified parameters.
Equivalent to BoundAsyncEventHandler(scheduling, release, null, null, null, null, null)
public BoundAsyncEventHandler(java.lang.Runnable logic)
BoundAsyncEventHandler with the
specified parameters.
Equivalent to BoundAsyncEventHandler(null, null, null, null,
null, null, logic)
public BoundAsyncEventHandler()
BoundAsyncEventHandler.
Equivalent to
BoundAsyncEventHandler(null, null, null, null, null, null, null)
@Deprecated public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, boolean nonheap, java.lang.Runnable logic)
BoundAsyncEventHandler(SchedulingParameters, ReleaseParameters,
MemoryParameters, MemoryArea, RealtimeThreadGroup, ConfigurationParameters,
Runnable)BoundAsyncEventHandler with the
specified parameters.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). When null
or when the affinity is not defined in this parameter, then this object will
inherits from the creating task's Affinity at execution of the handler.
However, this default Affinity will not appear when calling
AsyncBaseEventHandler.getSchedulingParameters(), that will only return
SchedulingParameters containing the affinity that was explicitly set.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.area - The MemoryArea for this. When
null, the memory area will be that of the
current thread/schedulable.group - A ProcessingGroupParameters object which will
be associated with the constructed instance. When
null, this will not be
associated with any processing group.logic - The Runnable object whose run() method is
executed by AsyncEventHandler.handleAsyncEvent(). When
null, the default handleAsyncEvent() method
invokes nothing.nonheap - When true, the code executed by this handler may
not reference or store objects in HeapMemory; otherwise,
that code may do so. When true and the current handler
tries to reference or store objects in HeapMemory or
enter the HeapMemory an
StaticIllegalArgumentException is thrown.StaticIllegalArgumentException - when nonheap
is false and logic, any
parameter object, or this is in heap memory.
Also when nonheap is true and area is
heap memory.IllegalAssignmentError - when the new AsyncEventHandler instance
cannot hold a reference to non-null values of
scheduling release memory
and group, or when
those parameters cannot hold a reference to the new
AsyncEventHandler.
Also when the new AsyncEventHandler instance
cannot hold a
reference to non-null values of area and
logic.