Class CollectorNetwork
java.lang.Object
|
+----VisiModel.ATMNetwork
|
+----CollectorNetwork
- public class CollectorNetwork
- extends ATMNetwork
Collector-specific representation of an IP/ATM network.
- Version:
- $Revision: 1.9 $, $Date: 2000/10/31 20:32:02 $
- Author:
- Mike Spengler, Joseph Thomas
-
addrs
-
-
ca
- Link back to CollectorAnalyzer
-
currTime
- The current
CollectorUpdate time.
-
dc
- Link back to DataCollector
-
locked
- Lock to synchronize work queues when deleting/merging elements.
-
lockedNode
-
-
ms
- The
ModelUpdate storage manager.
-
nodes
- Cache of actively updating nodes.
-
nWorkers
- How many DataCollectorWorkers there are
-
CollectorNetwork(String, ConfigMgr, ModelStorage, DataCollector, CollectorAnalyzer, long)
- Class constructor.
-
acquireLock(NodeAddress)
- Test if lock can be acquired and do so if possible
-
dumpState(FIFO)
- Dumps the current state of this network.
-
endCycle(NodeEnd)
- Ends a collector node update cycle.
-
findNode(NodeAddress)
- Finds a node in the nework.
-
getCachedNode(NodeAddress)
- Gets a node from the active cache.
-
getCurrTime()
- Gets the current
CollectorUpdate time.
-
getLock()
- Return status of lock
-
matchInterface(NodeAddress, CollectorNode)
- Check for interface with the address
-
releaseLock()
- Release lock
-
replaceCachedNode(NodeAddress, CollectorNode)
- Replaces a node in the active cache.
-
startCycle(NodeBegin)
- Starts a collector node update cycle.
-
updateModel(CollectorUpdate)
- Updates the network model using the supplied update object.
currTime
private static long currTime
- The current
CollectorUpdate time.
nodes
private CollectorNode nodes[]
- Cache of actively updating nodes.
addrs
private NodeAddress addrs[]
ms
protected ModelStorage ms
- The
ModelUpdate storage manager.
locked
private static boolean locked
- Lock to synchronize work queues when deleting/merging elements.
lockedNode
private static NodeAddress lockedNode
dc
private DataCollector dc
- Link back to DataCollector
ca
private CollectorAnalyzer ca
- Link back to CollectorAnalyzer
nWorkers
private int nWorkers
- How many DataCollectorWorkers there are
CollectorNetwork
public CollectorNetwork(String name,
ConfigMgr cm,
ModelStorage ms,
DataCollector dc,
CollectorAnalyzer ca,
long time)
- Class constructor.
- Parameters:
- name - the network's name
- cm - the configuration manager containing all
configuration information for this run
- ms - the
ModelUpdate storage manager
- time - the initial 'collector time'
updateModel
public synchronized void updateModel(CollectorUpdate update)
- Updates the network model using the supplied update object.
- Parameters:
- update - the update to be applied
startCycle
public void startCycle(NodeBegin update)
- Starts a collector node update cycle.
- Parameters:
- update - the update record starting the cycle
matchInterface
private boolean matchInterface(NodeAddress addr,
CollectorNode node)
- Check for interface with the address
- Parameters:
- addr - node address to match against
- node - node to search interface table of
- Returns:
- boolean value indicating that this node
has an interface with matching address
endCycle
public void endCycle(NodeEnd update)
- Ends a collector node update cycle.
- Parameters:
- update - the update record ending the cycle
getCachedNode
public CollectorNode getCachedNode(NodeAddress addr)
- Gets a node from the active cache.
- Parameters:
- addr - the address of a cached node
- Returns:
- the cached node
replaceCachedNode
public void replaceCachedNode(NodeAddress addr,
CollectorNode node)
- Replaces a node in the active cache.
- Parameters:
- addr - the address of a cached node
- node - the new node for the specified address
findNode
public CollectorNode findNode(NodeAddress addr)
- Finds a node in the nework.
- Parameters:
- addr - the address of the node to find
- Returns:
- the existing node or null if not found
dumpState
public void dumpState(FIFO f)
- Dumps the current state of this network.
- Parameters:
- f - where to queue the
ModelUpdate
objects representing the model's current state
getCurrTime
public static long getCurrTime()
- Gets the current
CollectorUpdate time.
- Returns:
- the current
CollectorUpdate time
acquireLock
private synchronized boolean acquireLock(NodeAddress node)
- Test if lock can be acquired and do so if possible
- Returns:
- if lock was acquired
getLock
public boolean getLock()
- Return status of lock
- Returns:
- current lock status
releaseLock
private void releaseLock()
- Release lock