ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.autotune
Class AutotuneMetricCollection

java.lang.Object
  |
  +--com.ibm.able.autotune.AutotuneMetricCollection
All Implemented Interfaces:
java.io.Serializable

public class AutotuneMetricCollection
extends java.lang.Object
implements java.io.Serializable

This class contains a collection of AutotuneMetrics The metrics can be retrieved in a single Hashtable, or as a set of 4 Vectors based on metric type The entire collection of metrics can also be logged to an external file It is meant to be used as a convenience class by AutotuneAgents and Controllers

See Also:
Serialized Form

Field Summary
protected  java.util.Vector configurationMetrics
           
static java.lang.String DefaultLogDataFileName
           
protected  AbleExport exportBean
           
protected  boolean logData
           
protected  java.lang.String logDataFileName
           
protected  java.util.Hashtable metrics
           
protected  java.util.Vector serviceLevelMetrics
           
protected  java.util.Vector tuningControlMetrics
           
protected  java.util.Vector workloadMetrics
           
 
Constructor Summary
AutotuneMetricCollection()
           
 
Method Summary
 void addMetric(AutotuneMetric metric)
          add a metric to the Hashtable and corresponding Vector Note: duplicates will be ignored!
 void closeLogDataFile()
          close a previously opened log data file
static java.lang.String Copyright()
          Determine the copyright of this class.
 void eraseLogDataFile()
          erase a previously opened log data file
 void generateDFNFile()
          write out the metadata describing the log file NOTE: this must follow the same order as the logData() method
 java.util.Vector getConfigurationMetrics()
          returns all configuration metrics in this collection
 boolean getLogData()
          see if logging is turned on or off
 java.lang.String getLogDataFileName()
          get the name of the file we are writing log data to
 AutotuneMetric getMetric(java.lang.String metricName)
          return the specified metric
 java.util.Hashtable getMetrics()
          returns a list of all metrics in this collection
 AutotuneMetric[] getMetrics(java.lang.String[] metricNames)
          returns a list of metrics in same order they appear in the metricNames convenience method
 double[] getMetricValues(AutotuneMetric[] metricList)
          returns an array of numeric metric values in the same order they appear in the metricList convenience method
 double[] getMetricValues(java.lang.String[] metricNames)
          returns an array of numeric metric values in the same order they appear in the metricNames parameter convenience method
 java.util.Vector getServiceLevelMetrics()
          returns all service level metrics in this collection
 java.util.Vector getTuningControlMetrics()
          returns all tuning control metrics in this collection
 java.util.Vector getWorkloadMetrics()
          returns all workload metrics in this collection
 boolean isEmpty()
          test whether this metric collection is empty or not
 boolean isLogData()
          see if logging is turned on or off
 void logData(AbleExport export)
          write a single record to the log file
 void openLogDataFile()
          create and open a log data file generate the corresponding *.dfn file
 void removeAll()
          remove all metrics from the Hashtable and corresponding Vectors
 void removeMetric(AutotuneMetric metric)
          remove a metric from the Hashtable and corresponding Vector
 void setLogData(boolean state)
          turn logging on or off
 void setLogDataFileName(java.lang.String fileName)
          set the name of the file to write log data to
 void writeLogData()
          write system state and control actions to log file for post mortem analysis, and replay if desired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metrics

protected java.util.Hashtable metrics

workloadMetrics

protected java.util.Vector workloadMetrics

configurationMetrics

protected java.util.Vector configurationMetrics

serviceLevelMetrics

protected java.util.Vector serviceLevelMetrics

tuningControlMetrics

protected java.util.Vector tuningControlMetrics

exportBean

protected AbleExport exportBean

logData

protected boolean logData

DefaultLogDataFileName

public static final java.lang.String DefaultLogDataFileName

logDataFileName

protected java.lang.String logDataFileName
Constructor Detail

AutotuneMetricCollection

public AutotuneMetricCollection()
Method Detail

addMetric

public void addMetric(AutotuneMetric metric)
add a metric to the Hashtable and corresponding Vector Note: duplicates will be ignored!

removeMetric

public void removeMetric(AutotuneMetric metric)
remove a metric from the Hashtable and corresponding Vector

removeAll

public void removeAll()
remove all metrics from the Hashtable and corresponding Vectors

isEmpty

public boolean isEmpty()
test whether this metric collection is empty or not

getMetrics

public java.util.Hashtable getMetrics()
returns a list of all metrics in this collection

getMetrics

public AutotuneMetric[] getMetrics(java.lang.String[] metricNames)
returns a list of metrics in same order they appear in the metricNames convenience method

getMetricValues

public double[] getMetricValues(AutotuneMetric[] metricList)
                         throws AbleDataException
returns an array of numeric metric values in the same order they appear in the metricList convenience method

getMetricValues

public double[] getMetricValues(java.lang.String[] metricNames)
                         throws AbleDataException
returns an array of numeric metric values in the same order they appear in the metricNames parameter convenience method

getMetric

public AutotuneMetric getMetric(java.lang.String metricName)
return the specified metric

getWorkloadMetrics

public java.util.Vector getWorkloadMetrics()
returns all workload metrics in this collection

getConfigurationMetrics

public java.util.Vector getConfigurationMetrics()
returns all configuration metrics in this collection

getServiceLevelMetrics

public java.util.Vector getServiceLevelMetrics()
returns all service level metrics in this collection

getTuningControlMetrics

public java.util.Vector getTuningControlMetrics()
returns all tuning control metrics in this collection

setLogData

public void setLogData(boolean state)
turn logging on or off

getLogData

public boolean getLogData()
see if logging is turned on or off

isLogData

public boolean isLogData()
see if logging is turned on or off

setLogDataFileName

public void setLogDataFileName(java.lang.String fileName)
set the name of the file to write log data to

getLogDataFileName

public java.lang.String getLogDataFileName()
get the name of the file we are writing log data to

writeLogData

public void writeLogData()
                  throws AbleException
write system state and control actions to log file for post mortem analysis, and replay if desired

eraseLogDataFile

public void eraseLogDataFile()
                      throws AbleException
erase a previously opened log data file

closeLogDataFile

public void closeLogDataFile()
                      throws AbleException
close a previously opened log data file

openLogDataFile

public void openLogDataFile()
                     throws AbleException
create and open a log data file generate the corresponding *.dfn file

generateDFNFile

public void generateDFNFile()
                     throws AbleException
write out the metadata describing the log file NOTE: this must follow the same order as the logData() method

logData

public void logData(AbleExport export)
             throws AbleException
write a single record to the log file

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.


ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003