Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.able.autotune
Class AutotuneMetric

    java.lang.Object
      com.ibm.able.autotune.AutotuneMetric

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  AutotuneConfigurationMetric, AutotuneServiceLevelMetric, AutotuneTuningControlMetric, AutotuneWorkloadMetric

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

An AutotuneMetric defines a single parameter on a target system It can represent a configuration settings, a workload indicator, a service level , or a tuning control Metrics can have sensors/effectors associated with them to do the actual method calls on the target system Or, their values can be set by the process() method on the Adaptor or Controller

See Also:
  Serialized Form

Field Summary
`protected AbleVariable` | `myInitialValue`
`protected AbleVariable` | `myValue`
`protected java.lang.String` | `name`
`protected int` | `referenceCount`
`protected AbleUserDefinedFunction` | `sensor`
`protected java.lang.Object[]` | `sensorArgs`

Constructor Summary
`AutotuneMetric()`
`AutotuneMetric(java.lang.String name)`
`AutotuneMetric(java.lang.String name, AbleVariable initialValue)`
`AutotuneMetric(java.lang.String name, AbleVariable initialValue, AbleUserDefinedFunction sensor)`
`AutotuneMetric(java.lang.String name, AbleVariable initialValue, AbleUserDefinedFunction sensor, java.lang.Object[] sensorArgs)`

Method Summary
`void` | `addReference()` register interest in this metric
`boolean` | `getBooleanValue()` Retrieve the value of this data object as a boolean value.
`AbleLiteral` | `getFuzzyValue()` Retrieve the value of this data object as a fuzzy value.
`java.lang.Object` | `getGenericValue()` Retrieve the value of this data object as an Object.
`AbleVariable` | `getInitialValue()`
`java.lang.String` | `getName()`
`double` | `getNumericValue()` Retrieve the value of this data object as a numeric value.
`java.lang.String` | `getStringValue()` Retrieve the value of this data object as a string value.
`AbleLiteral` | `getValue()` Retrieve the value of this data object as a literal.
`boolean` | `isActive()` returns true if this metric is being used for logging or by a controller that is, if it has a reference count > 0
`void` | `refreshValue()` call the sensor on the target system and get the current metric value.
`void` | `removeReference()` one less interested party in this metric
`void` | `reset()` Reset the variable to its intial state.
`void` | `setBooleanValue(boolean theNewValue)` Set the value of this data object from a boolean value.
`void` | `setGenericValue(java.lang.Object theNewValue)` Set the value of this data object from an object.
`void` | `setNumericValue(double theNewValue)` Set the value of this data object from a numeric value.
`void` | `setStringValue(java.lang.String theNewValue)` Set the value of this data object from a string value.
`void` | `setValue(AbleLiteral theNewValue)` Set the value of this data object from a literal object.
`java.lang.String` | `toString()`
`java.lang.String` | `xmlCWrString()` Return a formal XML "clause write" string that describes this data object.
`java.lang.String` | `xmlDclString()` Return a formal XML "declaration" string that describes this data object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### name

    protected java.lang.String name

### myInitialValue

    protected AbleVariable myInitialValue

### myValue

    protected AbleVariable myValue

### referenceCount

    protected int referenceCount

### sensor

    protected AbleUserDefinedFunction sensor

### sensorArgs

    protected java.lang.Object[] sensorArgs

Constructor Detail

### AutotuneMetric

    public AutotuneMetric()

### AutotuneMetric

    public AutotuneMetric(java.lang.String name)

### AutotuneMetric

    public AutotuneMetric(java.lang.String name,
                          AbleVariable initialValue)

### AutotuneMetric

    public AutotuneMetric(java.lang.String name,
                          AbleVariable initialValue,
                          AbleUserDefinedFunction sensor,
                          java.lang.Object[] sensorArgs)

### AutotuneMetric

    public AutotuneMetric(java.lang.String name,
                          AbleVariable initialValue,
                          AbleUserDefinedFunction sensor)

Method Detail

### getName

    public java.lang.String getName()

### refreshValue

    public void refreshValue()

  call the sensor on the target system and get the current metric value. If an exception occurs while setting the value, it is caught and logged as an Error, but not thrown so that processing continues.

### getInitialValue

    public AbleVariable getInitialValue()

### toString

    public java.lang.String toString()

### addReference

    public void addReference()

  register interest in this metric

### removeReference

    public void removeReference()

  one less interested party in this metric

### isActive

    public boolean isActive()

  returns true if this metric is being used for logging or by a controller that is, if it has a reference count > 0

### getBooleanValue

    public boolean getBooleanValue()
                            throws AbleDataException

  Retrieve the value of this data object as a boolean value.

  Returns:
    A boolean, if the value of this object can be represented as a boolean value. If the current value is 0.0, false is returned; any other numeric value returns true.
  Throws:
    `AbleDataException` - If the value of this object cannot be represented as a boolean value.

### getFuzzyValue

    public AbleLiteral getFuzzyValue()
                              throws AbleDataException

  Retrieve the value of this data object as a fuzzy value.

  Returns:
    A fuzzy set, if the value of this object can be represented as a fuzzy value. This method always throws an exception.
  Throws:
    `AbleDataException` - If the value of this object cannot be represented as a fuzzy value.

### getGenericValue

    public java.lang.Object getGenericValue()
                                     throws AbleDataException

  Retrieve the value of this data object as an Object.

  Returns:
    An Object.
  Throws:
    `AbleDataException` - If the value of this object cannot be represented as an Object.

### getNumericValue

    public double getNumericValue()
                           throws AbleDataException

  Retrieve the value of this data object as a numeric value.

  Returns:
    A double, if the value of this object can be represented as a numeric value.
  Throws:
    `AbleDataException` - If the value of this object cannot be represented as a numeric value.

### getStringValue

    public java.lang.String getStringValue()
                                    throws AbleDataException

  Retrieve the value of this data object as a string value.

  Returns:
    A String, if the value of this object can be represented as a string value.
  Throws:
    `AbleDataException` - If the value of this object cannot be represented as a string value.

### getValue

    public AbleLiteral getValue()
                         throws AbleDataException

  Retrieve the value of this data object as a literal.

  Returns:
    An AbleNumericLiteral object.
  Throws:
    `AbleDataException` - If the value of this object cannot be represented as a literal.

### setBooleanValue

    public void setBooleanValue(boolean theNewValue)
                         throws AbleDataException

  Set the value of this data object from a boolean value.

  Parameters:
    `theNewValue` - A boolean value. If the new value is true the variable is set to 1.0, but only if that value is within the universe of discourse; if the new value is false the variable is set to 0.0, but only if that value is within the universe of discourse.

  Throws:
    `AbleDataException` - If the value of this object cannot be represented as a boolean value.

### setGenericValue

    public void setGenericValue(java.lang.Object theNewValue)
                         throws AbleDataException

  Set the value of this data object from an object.

  Parameters:
    `theNewValue` - Any type of Object.

  Throws:
    `AbleDataException` - If the value of this object cannot be derived from the specified Object.

### setNumericValue

    public void setNumericValue(double theNewValue)
                         throws AbleDataException

  Set the value of this data object from a numeric value.

  Parameters:
    `theNewValue` - Any number. If the number is not within the universe of discourse for this variable, an exception is thrown.

  Throws:
    `AbleDataException` - If the value of this object cannot be represented as a numeric value.

### setStringValue

    public void setStringValue(java.lang.String theNewValue)
                        throws AbleDataException

  Set the value of this data object from a string value.

  Parameters:
    `theNewValue` - A string. The variable is set to the value of the string, but only if the string can be parsed to a double and that number is within the universe of discourse for this variable. otherwise an exception is thrown.

  Throws:
    `AbleDataException` - If the value of this object cannot be represented as a string value.

### setValue

    public void setValue(AbleLiteral theNewValue)
                  throws AbleDataException

  Set the value of this data object from a literal object.

  Parameters:
    `theNewValue` - An Able literal of any type. An attempt is made to convert the literal to an appropriate type before assigning it to this "writable" object. The resulting number must be within the universe of discourse for this variable.

  Throws:
    `AbleDataException` - If the value of this object cannot be determined from the literal object.

### xmlDclString

    public java.lang.String xmlDclString()

  Return a formal XML "declaration" string that describes this data object. Not currently used -- jpb

  Returns:
    A String describing the data object in XML.

### xmlCWrString

    public java.lang.String xmlCWrString()

  Return a formal XML "clause write" string that describes this data object. Not currently used -- jpb

  Returns:
    A String describing the data object in XML.

### reset

    public void reset()
               throws AbleDataException

  Reset the variable to its intial state.

  Throws:
    `AbleDataException`

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005