Class OptimizerTracer
java.lang.Object
org.apache.derby.impl.sql.compile.OptimizerTracer
- All Implemented Interfaces:
OptionalTool
OptionalTool for tracing the Optimizer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate SQLException
cantInstantiate
(String className) private static Context
getContext
(String contextID) Privileged lookup of a Context.void
Turns on optimizer tracing.void
unloadTool
(String... configurationParameters) Print the optimizer trace and turn off tracing.private SQLException
private SQLException
Wrap an exception in a SQLException
-
Constructor Details
-
OptimizerTracer
public OptimizerTracer()0-arg constructor required by the OptionalTool contract
-
-
Method Details
-
loadTool
Turns on optimizer tracing. May take optional parameters:
- xml - If the first arg is the "xml" literal, then trace output will be formatted as xml.
- custom, $class - If the first arg is the "custom" literal, then the next arg must be the name of a class which implements org.apache.derby.iapi.sql.compile.OptTrace and which has a 0-arg constructor. The 0-arg constructor is called and the resulting OptTrace object is plugged in to trace the optimizer.
- Specified by:
loadTool
in interfaceOptionalTool
- Throws:
SQLException
-
cantInstantiate
-
unloadTool
Print the optimizer trace and turn off tracing. Takes optional parameters:
- fileName - Where to write the optimizer trace. If omitted, the trace is written to System.out.
- Specified by:
unloadTool
in interfaceOptionalTool
- Throws:
SQLException
-
wrap
Wrap an exception in a SQLException -
wrap
-
getContext
Privileged lookup of a Context. Must be private so that user code can't call this entry point.
-