Class XPLAINDefaultVisitor
java.lang.Object
org.apache.derby.impl.sql.execute.xplain.XPLAINDefaultVisitor
- All Implemented Interfaces:
XPLAINVisitor
This is the Default Visitor which produces explain information like the
old getRuntimeStatistics() approach.
It exists to support backward-compatibility. The only thing this visitor does, is to log the output of the statistics to the default log stream. (the file derby.log)
It exists to support backward-compatibility. The only thing this visitor does, is to log the output of the statistics to the default log stream. (the file derby.log)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoXPLAIN(RunTimeStatistics rss, Activation activation) This method is the hook method which is called from the TopResultSet.voidreset()Call this method to reset the visitor for a new run over the statistics.voidsetNumberOfChildren(int noChildren) This method informs the visitor about the number of children.voidvisit(ResultSetStatistics statistics) This is the Visitor hook method, which gets called from each ResultSetStatistics.
-
Constructor Details
-
XPLAINDefaultVisitor
public XPLAINDefaultVisitor()
-
-
Method Details
-
visit
Description copied from interface:XPLAINVisitorThis is the Visitor hook method, which gets called from each ResultSetStatistics. It depends on the sub-class implementation of this interface, to describe the behaviour of the explanation facility.
To be easily extendable with new explain representation methods, just implement this interface and provide the new behaviour.- Specified by:
visitin interfaceXPLAINVisitor- Parameters:
statistics- the statistics, which want to get explained.
-
reset
public void reset()Description copied from interface:XPLAINVisitorCall this method to reset the visitor for a new run over the statistics. A default implementation should call this method automatically at first of a call of doXPLAIN().- Specified by:
resetin interfaceXPLAINVisitor
-
doXPLAIN
Description copied from interface:XPLAINVisitorThis method is the hook method which is called from the TopResultSet. It starts the explanation of the current ResultSetStatistics tree and keeps the information during one explain run.- Specified by:
doXPLAINin interfaceXPLAINVisitor
-
setNumberOfChildren
public void setNumberOfChildren(int noChildren) Description copied from interface:XPLAINVisitorThis method informs the visitor about the number of children. It has to be called first! by the different explainable nodes before the visit method of the visitor gets called. Each node knows how many children he has. The visitor can use this information to resolve the relationship of the current explained node to above nodes. Due to the top-down, pre-order, depth-first traversal of the tree, this information can directly be exploited.- Specified by:
setNumberOfChildrenin interfaceXPLAINVisitor- Parameters:
noChildren- the number of children of the current explained node.
-