public class BoundAsyncObjectEventHandler<P> extends AsyncObjectEventHandler<P> implements BoundSchedulable
AsyncObjectEventHandler that is permanently bound to a dedicated
RealtimeThread. Bound asynchronous object 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.
An instance of this class behaves exactly as an instance of
AsyncObjectEventHandler, with the only difference being that this
instance will have its own instance of RealtimeThread associated
to it.
An instance of this class should be used in preference
to a normal AsyncObjectEventHandler when the added timeliness of
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 AsyncObjectEventHandlers that may require
the same shared thread.
| Constructor and Description |
|---|
BoundAsyncObjectEventHandler()
Creates an instance of
BoundAsyncObjectEventHandler using
default values. |
BoundAsyncObjectEventHandler(Consumer<P> logic)
Creates an instance of
BoundAsyncObjectEventHandler. |
BoundAsyncObjectEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release)
Creates an instance of
BoundAsyncObjectEventHandler. |
BoundAsyncObjectEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
Consumer<P> logic)
Creates an instance of
BoundAsyncObjectEventHandler. |
BoundAsyncObjectEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
RealtimeThreadGroup group,
ConfigurationParameters config,
Consumer<P> logic)
Creates an instance of
BoundAsyncEventHandler (BAEH) with the
specified parameters. |
handleAsyncEvent, peekPending, releaseaddToFeasibility, getAndClearPendingFireCount, getAndDecrementPendingFireCount, getConfigurationParameters, getCurrentReleaseTime, getCurrentReleaseTime, getDispatcher, getMemoryArea, getMemoryParameters, getPendingFireCount, getProcessingGroupParameters, getQueueLength, getReleaseParameters, getReleaseRunner, getScheduler, getSchedulingParameters, isDaemon, mayUseHeap, removeFromFeasibility, run, setDaemon, setMemoryParameters, setProcessingGroupParameters, setReleaseParameters, setScheduler, setScheduler, setSchedulingParameters, setSchedulingParametersIfFeasible, 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, subsumesgetDispatcherpublic BoundAsyncObjectEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, RealtimeThreadGroup group, ConfigurationParameters config, Consumer<P> logic)
BoundAsyncEventHandler (BAEH) with the
specified parameters.ProcessorAffinityException - when the Affinity in SchedulingParameters
is invalid or not a subset of the groups this is
associated to.StaticIllegalArgumentException - when config is of type
javax.realtime.memory.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 follow:
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 Consumer object whose accept()
method is executed by
AsyncObjectEventHandler.handleAsyncEvent(Object).
When null, the default handleAsyncEvent
method invokes nothing.public BoundAsyncObjectEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, Consumer<P> logic)
BoundAsyncObjectEventHandler.
This constructor is equivalent to
BoundAsyncObjectEventHandler(scheduling, release, null, null, null, null, logic)public BoundAsyncObjectEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release)
BoundAsyncObjectEventHandler.
Calling this constructor is equivalent to calling
BoundAsyncObjectEventHandler(scheduling, release, null, null, null, null, null)public BoundAsyncObjectEventHandler(Consumer<P> logic)
BoundAsyncObjectEventHandler.
Calling this constructor is equivalent to calling
BoundAsyncObjectEventHandler(null, null, null, null, null, null, logic)public BoundAsyncObjectEventHandler()
BoundAsyncObjectEventHandler using
default values. Calling this constructor is equivalent to calling
BoundAsyncObjectEventHandler(null, null, null, null, null, null, null)aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2024 aicas GmbH. All Rights Reserved.