Class CollectorAnalyzer

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

public class CollectorAnalyzer
extends Thread
Coordinates the processing of all CollectorUpdate data.

Version:
$Revision: 1.13 $, $Date: 2000/10/31 20:35:46 $
Author:
Mike Spengler, Joseph Thomas

Variable Index

 o cs
Pointer to the CollectorStorage manager for this run
 o cuQ
FIFO queue for CollectorUpdates waiting to be processed
 o dc
Pointer to the DataCollector manager for this run
 o ms
Pointer to the ModelStorage manager for this run
 o net
Pointer to the CollectorNetwork reprenting this run
 o qpause
Number of milliseconds to pause between update queue runs

Constructor Index

 o CollectorAnalyzer(ConfigMgr, CollectorStorage, DataCollector)
Class constructor.

Method Index

 o delete(CollectorUpdate)
Delete the given update from the queue.
 o dequeueUpdate()
Dequeues a CollectorUpdate from our internal processing queue.
 o enqueueUpdate(CollectorUpdate)
Queues the specified CollectorUpdate to our internal processing queue.
 o finalize()
Ensures that input FIFO are drained.
 o getQueueIteration()
Return an enumeration of the FIFO queue.
 o queueSize()
Gets the number of components currently on the processing queue.
 o run()
Processes the entries on our internal processing queue.

Variables

 o qpause
 private static final int qpause
Number of milliseconds to pause between update queue runs

 o cs
 private CollectorStorage cs
Pointer to the CollectorStorage manager for this run

 o ms
 private ModelStorage ms
Pointer to the ModelStorage manager for this run

 o dc
 private DataCollector dc
Pointer to the DataCollector manager for this run

 o cuQ
 private FIFO cuQ
FIFO queue for CollectorUpdates waiting to be processed

 o net
 private CollectorNetwork net
Pointer to the CollectorNetwork reprenting this run

Constructors

 o CollectorAnalyzer
 public CollectorAnalyzer(ConfigMgr cm,
                          CollectorStorage cs,
                          DataCollector dc)
Class constructor.

Parameters:
cm - the configuration manager containing all configuration information for this run
cs - the storage object for performing CollectorUpdate I/O
Throws: IOException
if any files couldn't be opened

Methods

 o run
 public void run()
Processes the entries on our internal processing queue.

Overrides:
run in class Thread
 o enqueueUpdate
 public void enqueueUpdate(CollectorUpdate update)
Queues the specified CollectorUpdate to our internal processing queue.

Parameters:
update - the CollectorUpdate to be queued
 o dequeueUpdate
 public CollectorUpdate dequeueUpdate()
Dequeues a CollectorUpdate from our internal processing queue.

Returns:
the CollectorUpdate from the queue
 o queueSize
 public int queueSize()
Gets the number of components currently on the processing queue.

Returns:
the count of components on the processing queue
 o delete
 public void delete(CollectorUpdate up)
Delete the given update from the queue.

Parameters:
up - update record to be deleted
 o getQueueIteration
 public Enumeration getQueueIteration()
Return an enumeration of the FIFO queue.

Returns:
the queue enumeration
 o finalize
 protected void finalize() throws IOException
Ensures that input FIFO are drained.

Throws: IOException
if an I/O error occurs
Overrides:
finalize in class Object