protected static final class TPSPThreadManager.SourceDequeueInterceptor
extends java.lang.Object
implements org.apache.excalibur.event.DequeueInterceptor
| Modifier and Type | Field and Description |
|---|---|
private org.apache.excalibur.event.EventHandler |
m_handler |
private TPSPThreadManager.SourceRunner |
m_initRunner |
private int |
m_margin |
private org.apache.excalibur.event.DequeueInterceptor |
m_parent |
private java.util.LinkedList |
m_runners |
private org.apache.excalibur.event.Source |
m_source |
private EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
m_threadPool |
private int |
m_threshold |
| Constructor and Description |
|---|
TPSPThreadManager.SourceDequeueInterceptor(TPSPThreadManager.SourceRunner runner,
org.apache.excalibur.event.EventHandler handler,
EDU.oswego.cs.dl.util.concurrent.PooledExecutor threadPool,
int threshold,
int margin)
Create a new SourceDequeueInterceptor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(org.apache.excalibur.event.Source context)
An operation executed after dequeing events from
the queue.
|
void |
before(org.apache.excalibur.event.Source context)
An operation executed before dequeing events from
the queue.
|
void |
stop()
Ensure all event runners are stopped for this partial pipeline.
|
private final org.apache.excalibur.event.Source m_source
private final EDU.oswego.cs.dl.util.concurrent.PooledExecutor m_threadPool
private final int m_threshold
private final org.apache.excalibur.event.DequeueInterceptor m_parent
private final int m_margin
private final java.util.LinkedList m_runners
private final org.apache.excalibur.event.EventHandler m_handler
private final TPSPThreadManager.SourceRunner m_initRunner
public TPSPThreadManager.SourceDequeueInterceptor(TPSPThreadManager.SourceRunner runner, org.apache.excalibur.event.EventHandler handler, EDU.oswego.cs.dl.util.concurrent.PooledExecutor threadPool, int threshold, int margin)
runner - The initial SourceRunner.handler - The EventHandler to send events to.threadPool - The PooledExecutor for the set of threads.threshold - The threshold of events before a new thread is executed.margin - The margin of error allowed for the events.public void before(org.apache.excalibur.event.Source context)
This method is called once at the beginning of any dequeue
method regardless of how many queue elements are dequeued.
before in interface org.apache.excalibur.event.DequeueInterceptorcontext - The source from which the dequeue is performed.public void after(org.apache.excalibur.event.Source context)
This method is called once at the end of any dequeue
method regardless of how many queue elements are dequeued.
after in interface org.apache.excalibur.event.DequeueInterceptorcontext - The source from which the dequeue is performed.public void stop()