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.| Constructor and Description |
|---|
BoundAsyncObjectEventHandler()
Creates an instance of
BoundAsyncObjectEventHandler using
default values. |
BoundAsyncObjectEventHandler(java.util.function.Consumer<P> logic)
Creates an instance of
BoundAsyncObjectEventHandler. |
BoundAsyncObjectEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release)
Creates an instance of
BoundAsyncObjectEventHandler. |
BoundAsyncObjectEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
java.util.function.Consumer<P> logic)
Creates an instance of
BoundAsyncObjectEventHandler. |
BoundAsyncObjectEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
RealtimeThreadGroup group,
ConfigurationParameters config,
java.util.function.Consumer<P> logic)
Creates an instance of
BoundAsyncObjectEventHandler which specifies
all possible parameters. |
handleAsyncEvent, peekPending, releaseaddToFeasibility, 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 BoundAsyncObjectEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, RealtimeThreadGroup group, ConfigurationParameters config, java.util.function.Consumer<P> logic)
BoundAsyncObjectEventHandler which specifies
all possible parameters.
The newly-created handler inherits the
affinity of its creator. The Affinity of the newly-created handler will be
set as follow:
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(P).
When null, the default handleAsyncEvent method
invokes nothing.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
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 BoundAsyncObjectEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, java.util.function.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(java.util.function.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. This constructor is equivalent to
BoundAsyncObjectEventHandler(null, null, null, null, null, null, null)