public class BoundAsyncLongEventHandler extends AsyncLongEventHandler implements BoundSchedulable
AsyncLongEventHandler
that is permanently bound to a dedicated
RealtimeThread
. Bound asynchronous long 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 |
---|
BoundAsyncLongEventHandler()
Creates an instance of
BoundAsyncLongEventHandler using
default values. |
BoundAsyncLongEventHandler(java.util.function.LongConsumer logic)
Creates an instance of
BoundAsyncLongEventHandler . |
BoundAsyncLongEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release)
Creates an instance of
BoundAsyncLongEventHandler . |
BoundAsyncLongEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
java.util.function.LongConsumer logic)
Creates an instance of
BoundAsyncLongEventHandler . |
BoundAsyncLongEventHandler(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
RealtimeThreadGroup group,
ConfigurationParameters config,
java.util.function.LongConsumer logic)
Creates an instance of
BoundAsyncEventHandler (BAEH) with the
specified parameters. |
handleAsyncEvent, peekPending, release
addToFeasibility, 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, subsumes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToFeasibility, getConfigurationParameters, getMemoryParameters, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, isDaemon, mayUseHeap, removeFromFeasibility, setDaemon, setMemoryParameters, setProcessingGroupParameters, setReleaseParameters, setScheduler, setScheduler, setSchedulingParameters, subsumes
public BoundAsyncLongEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, RealtimeThreadGroup group, ConfigurationParameters config, java.util.function.LongConsumer 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 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 LongConsumer
object whose accept()
method is executed by
AsyncLongEventHandler.handleAsyncEvent(long)
.
When null
, the default handleAsyncEvent(long)
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 BoundAsyncLongEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release, java.util.function.LongConsumer logic)
BoundAsyncLongEventHandler
.
This constructor is equivalent to
BoundAsyncLongEventHandler(scheduling, release, null, null, null, null, logic)
public BoundAsyncLongEventHandler(SchedulingParameters scheduling, ReleaseParameters<?> release)
BoundAsyncLongEventHandler
.
Calling this constructor is equivalent to calling
BoundAsyncLongEventHandler(scheduling, release, null, null, null, null, null)
public BoundAsyncLongEventHandler(java.util.function.LongConsumer logic)
BoundAsyncLongEventHandler
.
Calling this constructor is equivalent to calling
BoundAsyncLongEventHandler(null, null, null, null, null, null, logic)
public BoundAsyncLongEventHandler()
BoundAsyncLongEventHandler
using
default values. Calling this constructor is equivalent to calling
BoundAsyncLongEventHandler(null, null, null, null, null, null, null)