|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.excalibur.event.command.TPSPThreadManager.SourceDequeueInterceptor
protected static final class TPSPThreadManager.SourceDequeueInterceptor
This is used to plug into Queues so that we can intercept calls to the dequeue operation.
Field Summary | |
---|---|
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
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.Method Detail |
---|
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.DequeueInterceptor
context
- 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.DequeueInterceptor
context
- The source from which the dequeue is performed.public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |