org.globus.ogsa.utils
Class SweeperPool

java.lang.Object
  extended byorg.globus.ogsa.utils.SweeperPool

public class SweeperPool
extends java.lang.Object

Pool of timers responsible for performing reoccuring sweep tasks. It can be used in the same way as the java.util.Timer class, with the only difference that the tasks added will be distributed in a round-robin fashion among the available Timers. Each timer takes up one background thread. The number of threads available in the default pool can be configured using the 'sweeperThreads' global deployment descriptor configuration property. The number of threads available in a pool can also be specified when creating a new pool.


Constructor Summary
SweeperPool()
           
SweeperPool(int numThreads, int interval)
           
 
Method Summary
 void addTask(java.util.TimerTask task)
          Behaves just like Timer.schedule() operation with delay and period times equal to the interval value the pool was initialized with.
 void addTask(java.util.TimerTask task, long delay)
          Behaves just like Timer.schedule() operation.
 void addTask(java.util.TimerTask task, long delay, long period)
          Behaves just like Timer.schedule() operation.
static SweeperPool getDefaultPool()
           
 void startTimers()
           
 void stopTimers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SweeperPool

public SweeperPool()

SweeperPool

public SweeperPool(int numThreads,
                   int interval)
Method Detail

getDefaultPool

public static SweeperPool getDefaultPool()

addTask

public void addTask(java.util.TimerTask task)
Behaves just like Timer.schedule() operation with delay and period times equal to the interval value the pool was initialized with.


addTask

public void addTask(java.util.TimerTask task,
                    long delay,
                    long period)
Behaves just like Timer.schedule() operation.


addTask

public void addTask(java.util.TimerTask task,
                    long delay)
Behaves just like Timer.schedule() operation.


stopTimers

public void stopTimers()

startTimers

public void startTimers()


Copyright ? 1999 University of Chicago and The University of Southern California. All Rights Reserved.