org.apache.excalibur.event.command
Class TPSPThreadManager
java.lang.Object
org.apache.excalibur.event.command.TPSPThreadManager
- All Implemented Interfaces:
- ThreadManager
- public final class TPSPThreadManager
- extends java.lang.Object
- implements ThreadManager
This is a ThreadManager which provides a threadpool per Sink per EventPipeline. ::NOTE:: This is not tested yet!
- Author:
| Fields inherited from interface org.apache.excalibur.event.command.ThreadManager |
ROLE |
| Constructor Summary |
TPSPThreadManager()
The default constructor assumes there is a system property named "os.arch.cpus" that has a default for the number of CPUs on a system. |
TPSPThreadManager(int maxThreadPerPool, int threshold)
Constructor provides a specified number of threads per processor. |
TPSPThreadManager(int maxThreadPerPool, int threshold, int margin)
Constructor provides a specified number of threads per processor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_pipelines
private final StaticBucketMap m_pipelines
-
m_maxThreadsPerPool
private final int m_maxThreadsPerPool
-
m_threshold
private final int m_threshold
-
m_margin
private final int m_margin
-
TPSPThreadManager
public TPSPThreadManager()
-
The default constructor assumes there is a system property named "os.arch.cpus" that has a default for the number of CPUs on a system. Otherwise, the value is 1.
TPSPThreadManager
public TPSPThreadManager(int maxThreadPerPool,
int threshold)
-
Constructor provides a specified number of threads per processor. If either value is less then one, then the value is rewritten as one.
- Parameters:
maxThreadPerPool - The number of processors in the machine
threshold - The number of events before a new thread is started
TPSPThreadManager
public TPSPThreadManager(int maxThreadPerPool,
int threshold,
int margin)
-
Constructor provides a specified number of threads per processor. If either value is less then one, then the value is rewritten as one.
- Parameters:
maxThreadPerPool - The number of processors in the machine
threshold - The number of events before a new thread is started
margin - The number of events +/- the threshold for thread evaluation
register
public void register(EventPipeline pipeline)
-
Register an EventPipeline with the ThreadManager.
-
- Specified by:
register in interface ThreadManager
-
- Parameters:
pipeline - The pipeline we are registering
deregister
public void deregister(EventPipeline pipeline)
-
Deregister an EventPipeline with the ThreadManager
-
- Specified by:
deregister in interface ThreadManager
-
- Parameters:
pipeline - The pipeline to unregister
deregisterAll
public void deregisterAll()
-
Deregisters all EventPipelines from this ThreadManager
-
- Specified by:
deregisterAll in interface ThreadManager
-
Please see keelframework.org for information about new Keel releases.