|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.autotune.AutotuneMetric
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
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 |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
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 |
protected java.lang.String name
protected AbleVariable myInitialValue
protected AbleVariable myValue
protected int referenceCount
protected AbleUserDefinedFunction sensor
protected java.lang.Object[] sensorArgs
Constructor Detail |
public AutotuneMetric()
public AutotuneMetric(java.lang.String name)
public AutotuneMetric(java.lang.String name, AbleVariable initialValue)
public AutotuneMetric(java.lang.String name, AbleVariable initialValue, AbleUserDefinedFunction sensor, java.lang.Object[] sensorArgs)
public AutotuneMetric(java.lang.String name, AbleVariable initialValue, AbleUserDefinedFunction sensor)
Method Detail |
public java.lang.String getName()
public void refreshValue()
public AbleVariable getInitialValue()
public java.lang.String toString()
toString
in class java.lang.Object
public void addReference()
public void removeReference()
public boolean isActive()
public boolean getBooleanValue() throws AbleDataException
AbleDataException
- If the value of this object cannot be represented as
a boolean value.public AbleLiteral getFuzzyValue() throws AbleDataException
AbleDataException
- If the value of this object cannot be represented as
a fuzzy value.public java.lang.Object getGenericValue() throws AbleDataException
AbleDataException
- If the value of this object cannot be represented as
an Object.public double getNumericValue() throws AbleDataException
AbleDataException
- If the value of this object cannot be represented as
a numeric value.public java.lang.String getStringValue() throws AbleDataException
AbleDataException
- If the value of this object cannot be represented as
a string value.public AbleLiteral getValue() throws AbleDataException
AbleDataException
- If the value of this object cannot be represented as
a literal.public void setBooleanValue(boolean theNewValue) throws AbleDataException
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.
AbleDataException
- If the value of this object cannot be represented as
a boolean value.public void setGenericValue(java.lang.Object theNewValue) throws AbleDataException
theNewValue
- Any type of Object.
AbleDataException
- If the value of this object cannot be derived from
the specified Object.public void setNumericValue(double theNewValue) throws AbleDataException
theNewValue
- Any number. If the number is not within the universe
of discourse for this variable, an exception is
thrown.
AbleDataException
- If the value of this object cannot be represented as
a numeric value.public void setStringValue(java.lang.String theNewValue) throws AbleDataException
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.
AbleDataException
- If the value of this object cannot be represented as
a string value.public void setValue(AbleLiteral theNewValue) throws AbleDataException
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.
AbleDataException
- If the value of this object cannot be determined
from the literal object.public java.lang.String xmlDclString()
public java.lang.String xmlCWrString()
public void reset() throws AbleDataException
public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |