mwalk Platform 0.3.0

mwalk.visitor
Class UpathMetricVisitor

java.lang.Object
  |
  +--mwalk.visitor.AbstractVisitor
        |
        +--mwalk.visitor.PrintVisitor
              |
              +--mwalk.visitor.MetricVisitor
                    |
                    +--mwalk.visitor.BasicMetricVisitor
                          |
                          +--mwalk.visitor.UpathMetricVisitor

public class UpathMetricVisitor
extends BasicMetricVisitor

An implementation of a visitor that gathers metric data, but uses real unicast path lengths in calculations rather than assuming multicast paths equate to unicast paths.

Version:
1.0
Author:
Robert Chalmers

Field Summary
private static java.lang.String DEF_FILENAME
          Default file name if none supplied
protected  java.lang.String pathFile
           
 
Fields inherited from class mwalk.visitor.BasicMetricVisitor
CFG_BASE, DEF_FILENAME, optMulti, optRun
 
Fields inherited from class mwalk.visitor.MetricVisitor
CFG_BASE, DEF_FILENAME, offset, periods, time, timeval
 
Fields inherited from class mwalk.visitor.PrintVisitor
CFG_BASE, def_filename, filename, ps
 
Fields inherited from class mwalk.visitor.AbstractVisitor
CFG_BASE, eval, seen, verbose
 
Constructor Summary
UpathMetricVisitor()
          Default constructor.
UpathMetricVisitor(long periods)
           
UpathMetricVisitor(java.lang.String filename)
          Constructor.
UpathMetricVisitor(java.lang.String filename, long periods)
           
 
Method Summary
protected  MetricCount addLinks(MetricCount count, int mlinks)
           
 boolean init(Tree tree)
          Initialize the visitor state.
 java.lang.Object visitDown(Tree tree, TreeNode node)
          Visit the current node prior to visiting children.
 
Methods inherited from class mwalk.visitor.BasicMetricVisitor
again, doVisit, getFilename, printHeader, process
 
Methods inherited from class mwalk.visitor.MetricVisitor
getChildren, getTime, incTime, postfix, setTime, startTime, visitDown
 
Methods inherited from class mwalk.visitor.PrintVisitor
printData, printData, setFilename
 
Methods inherited from class mwalk.visitor.AbstractVisitor
cfgBoolean, cfgInt, cfgString, cfgVisitor, evaluator, evaluator, getParents, getReceivers, haveSeen, haveVisited, markSeen, markVisited, nextReceiver, prefix, reset, verbose, visitUp, visitUp, walkDown, walkUp
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

DEF_FILENAME

private static final java.lang.String DEF_FILENAME
Default file name if none supplied

pathFile

protected java.lang.String pathFile
Constructor Detail

UpathMetricVisitor

public UpathMetricVisitor()
Default constructor.

UpathMetricVisitor

public UpathMetricVisitor(java.lang.String filename)
Constructor.
Parameters:
String - new default filename

UpathMetricVisitor

public UpathMetricVisitor(long periods)

UpathMetricVisitor

public UpathMetricVisitor(java.lang.String filename,
                          long periods)
Method Detail

init

public boolean init(Tree tree)
Initialize the visitor state.
Overrides:
init in class BasicMetricVisitor
Parameters:
Tree - current tree instance

visitDown

public java.lang.Object visitDown(Tree tree,
                                  TreeNode node)
                           throws VisitException
Visit the current node prior to visiting children. This method is called if prefix() returns true.
Overrides:
visitDown in class MetricVisitor
Parameters:
Tree - current tree instance
TreeNode - current node
Returns:
Object optional return value to pass back along the path
Throws:
VisitException - if a problem ocurred during visit

addLinks

protected MetricCount addLinks(MetricCount count,
                               int mlinks)
Overrides:
addLinks in class BasicMetricVisitor

mwalk Platform 0.3.0

Submit a bug or feature mwalk Platform API Specification 0.3.0
Sensitivity: {Public:Research}
Copyright(c) 2000, Robert Chalmers