org.apache.avalon.excalibur.command
Class TPSPThreadManager

java.lang.Object
  |
  +--org.apache.avalon.excalibur.command.TPSPThreadManager
All Implemented Interfaces:
java.lang.Runnable, ThreadManager

public final class TPSPThreadManager
extends java.lang.Object
implements java.lang.Runnable, ThreadManager

This is a ThreadManager which provides a threadpool per Sink per EventPipeline. ::NOTE:: This is not implemented yet!

Author:
Berin Loritsch

Inner Class Summary
static class TPSPThreadManager.PipelineRunner
           
 
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 numProcessors, int threadsPerProcessor, long sleepTime)
          Constructor provides a specified number of threads per processor.
 
Method Summary
 void deregister(EventPipeline pipeline)
          Deregister an EventPipeline with the ThreadManager
 void deregisterAll()
          Deregisters all EventPipelines from this ThreadManager
 void register(EventPipeline pipeline)
          Register an EventPipeline with the ThreadManager.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 numProcessors,
                         int threadsPerProcessor,
                         long sleepTime)
Constructor provides a specified number of threads per processor. If either value is less then one, then the value is rewritten as one.
Method Detail

register

public void register(EventPipeline pipeline)
Register an EventPipeline with the ThreadManager.
Specified by:
register in interface ThreadManager

deregister

public void deregister(EventPipeline pipeline)
Deregister an EventPipeline with the ThreadManager
Specified by:
deregister in interface ThreadManager

deregisterAll

public void deregisterAll()
Deregisters all EventPipelines from this ThreadManager
Specified by:
deregisterAll in interface ThreadManager

run

public void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.