Class DataCollectorWorker

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----DataCollectorWorker

public class DataCollectorWorker
extends Thread
Individual worker thread for parallelized network data collection.

Version:
$Revision: 1.7 $, $Date: 2000/10/31 20:32:02 $
Author:
Mike Spengler, Joseph Thomas

Variable Index

 o ca
Pointer to the CollectorAnalyzer for this run
 o currentHost
The entry describing the node we're currently working on
 o net
Pointer to the CollectorNetwork which represents this run
 o parent
Pointer to the DataCollector which owns this thread
 o qpause
number of ms to pause between loops to force us to give up the CPU
 o threadCount
The overall number of worker threads created
 o threadNum
Our unique individual thread number
 o waiting
Flag indicating if we're locked out from processing by an external event

Constructor Index

 o DataCollectorWorker(DataCollector, int, CollectorAnalyzer, CollectorNetwork)
Class constructor.

Method Index

 o getCurrentHost()
Returns the node of the host this thread is working on.
 o isWaiting()
Returns 'waiting' status
 o run()
Gets host on which to operate.

Variables

 o parent
 private DataCollector parent
Pointer to the DataCollector which owns this thread

 o ca
 private CollectorAnalyzer ca
Pointer to the CollectorAnalyzer for this run

 o qpause
 private static final int qpause
number of ms to pause between loops to force us to give up the CPU

 o currentHost
 private HostEntry currentHost
The entry describing the node we're currently working on

 o threadNum
 private int threadNum
Our unique individual thread number

 o threadCount
 private static int threadCount
The overall number of worker threads created

 o net
 private CollectorNetwork net
Pointer to the CollectorNetwork which represents this run

 o waiting
 private boolean waiting
Flag indicating if we're locked out from processing by an external event

Constructors

 o DataCollectorWorker
 public DataCollectorWorker(DataCollector dc,
                            int n,
                            CollectorAnalyzer ca,
                            CollectorNetwork net)
Class constructor.

Parameters:
dc - our controlling parent thread
n - our worker thread number
ca - the collector analyzer
net - pointer to ATMNetwork we're working on

Methods

 o run
 public void run()
Gets host on which to operate. Calls HostEntry.query() method.

Overrides:
run in class Thread
 o getCurrentHost
 public HostEntry getCurrentHost()
Returns the node of the host this thread is working on.

Returns:
the HostEntry for the host currently being processed
 o isWaiting
 public boolean isWaiting()
Returns 'waiting' status

Returns:
value of waiting