public abstract class ReleaseRunner extends Object
ConfigurationParameters
,
RealtimeThreadGroup
, and Affinity
.
The other parameters for instances of Schedulable
can either be
set for each release or be configurable for the pool. In the latter case,
one should not be able to associate a handler with the runner that has an
incompatible parameter set. These other parameters are
SchedulingParameters
, ReleaseParameters
, and
MemoryParameters
, as well as the MemoryArea
in which the
release should take place.
The default release runner, BlockableReleaseRunner
, sets these other
parameters on the releasing thread at each release. Since there may be
a performance penalty for doing this, an application can define its own
release runners for commonly occurring cases of these parameters. It is then
up to the application to ensure that handlers are matched to the correct
release runner.
Modifier | Constructor and Description |
---|---|
protected |
ReleaseRunner(RealtimeThreadGroup group)
Enables creating a subclass of this class.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
attach(AsyncBaseEventHandler handler)
Notifies this runner that the handler is now associated with it.
|
protected abstract void |
detach(AsyncBaseEventHandler handler)
Notifies this runner that the handler is no longer associated with it.
|
abstract ConfigurationParameters |
getConfigurationParameters()
Get the
ConfigurationParameters object used for all threads
provided by this release runner. |
protected RealtimeThreadGroup |
getRealtimeThreadGroup()
Determine the
RealtimeThreadGroup instance used. |
protected abstract void |
release(AsyncBaseEventHandler handler)
Finds a thread and has it call the
Runnable.run()
method. |
protected ReleaseRunner(RealtimeThreadGroup group)
protected RealtimeThreadGroup getRealtimeThreadGroup()
RealtimeThreadGroup
instance used.RealtimeThreadGroup
instance used by all threads
used for running releases.public abstract ConfigurationParameters getConfigurationParameters()
ConfigurationParameters
object used for all threads
provided by this release runner.protected abstract void release(AsyncBaseEventHandler handler)
Runnable.run()
method. Care should be exercised when implementing this method, since
it adds to both the latency and jitter of releasing events.
This method should only be called from the infrastructure.
handler
- The handler to be released.protected abstract void attach(AsyncBaseEventHandler handler) throws StaticIllegalStateException
This method should only be called from the infrastructure.
StaticIllegalStateException
- when handler
is
already attached.handler
- The handler to be attachedprotected abstract void detach(AsyncBaseEventHandler handler) throws StaticIllegalStateException
This method should only be called from the infrastructure.
StaticIllegalStateException
- when handler
is not attached.handler
- The handler to be removedaicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.