|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the top level interface for statistics gathering. This interface is generalized for all statistics gathering and provides a standard means to access properties. These properties will be set by either by the query objects themselves and accessed by outside components (Cost Model, ExecutionEngine, etc) or vice versa. These properties will be used to retrieve information about a query object such as its throughput -or- it will be used by an outside component to customize how the object should run, such as how much work it should do. All property values are strings, although they can be converted into ints or doubles, depending on the property. Each implementation of this interface should provide validation of a given property in the setProperty method. Furthermore, each implementation is responsible for setting the default properties that it will support.
Method Summary | |
java.util.Enumeration |
getProperties()
Returns an enumeration of property names supported by this query object |
java.lang.String |
getProperty(java.lang.String name)
Retrieve the value of the property with the given name. |
boolean |
isValidPropertyName(java.lang.String nameToCheck)
Checks if the given property is valid for this QueryObject. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets the given property to the new value. |
Method Detail |
public java.util.Enumeration getProperties()
public java.lang.String getProperty(java.lang.String name)
name
- the name of the property to returnpublic boolean isValidPropertyName(java.lang.String nameToCheck)
nameToCheck
- is the name to checkpublic void setProperty(java.lang.String name, java.lang.String value) throws java.lang.Exception
Once it is known that the object supports the property, the value must be validated. Each implementor of XATStatistics has a set of properties that are common to all of its types and some that are specific to types. For example, all XATOperators (which implement XATStatistics) have certain properties while an individual XATOperator has specific properties. The indivual types should only validate their own specific types. If the caller is trying to set a common type, it should be validated by the super class by calling super.setProperty(name, value). This will reduce duplicate code.
When it is determined the name / value pair is correct, the pair is updated using setNewPropertyValue()
XATStatisticsImp provides default validation by checking to see if the property's value is
>=0. propertyValues that are Strings will just be set. If the property requires more strict constraints than this,
it is up to the subclass that created the property to validate it (as described above).
name
- the name of the property to setvalue
- the new value of the property
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |