seda.sandStorm.internal
Class TPPThreadManager

java.lang.Object
  extended by seda.sandStorm.internal.TPPThreadManager
All Implemented Interfaces:
ThreadManagerIF

 class TPPThreadManager
extends java.lang.Object
implements ThreadManagerIF

TPPThreadManager is a thread manager implementation which provides one thread per CPU.


Nested Class Summary
(package private)  class TPPThreadManager.appThread
          Internal class representing a single TPPTM-managed thread.
 
Field Summary
private static boolean DEBUG
           
private static boolean DEBUG_VERBOSE
           
private  int max_threads
           
private  int num_cpus
           
private  java.util.Vector stages
           
private  java.lang.ThreadGroup tg
           
private  java.util.Vector threads
           
 
Constructor Summary
TPPThreadManager(SandstormConfig config)
          Create an TPPThreadManager which attempts to schedule stages on num_cpus CPUs, and caps its thread usage to max_threads.
 
Method Summary
 void deregister(StageWrapperIF stage)
          Deregister a stage with this thread manager.
 void deregisterAll()
          Deregister all stage with this thread manager.
 void register(StageWrapperIF stage)
          Register a stage with this thread manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

DEBUG_VERBOSE

private static final boolean DEBUG_VERBOSE
See Also:
Constant Field Values

num_cpus

private int num_cpus

max_threads

private int max_threads

stages

private java.util.Vector stages

threads

private java.util.Vector threads

tg

private java.lang.ThreadGroup tg
Constructor Detail

TPPThreadManager

TPPThreadManager(SandstormConfig config)
Create an TPPThreadManager which attempts to schedule stages on num_cpus CPUs, and caps its thread usage to max_threads.

Method Detail

register

public void register(StageWrapperIF stage)
Register a stage with this thread manager.

Specified by:
register in interface ThreadManagerIF

deregister

public void deregister(StageWrapperIF stage)
Deregister a stage with this thread manager.

Specified by:
deregister in interface ThreadManagerIF

deregisterAll

public void deregisterAll()
Deregister all stage with this thread manager.

Specified by:
deregisterAll in interface ThreadManagerIF