Top Description Constructors Methods
org.apache.derby.impl.sql.compile

public Class OptimizerTracer

extends Object
implements OptionalTool
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.dictionary.OptionalTool
Imports
java.io.File, .IOException, .PrintWriter, java.sql.SQLException, org.apache.derby.iapi.db.OptimizerTrace, org.apache.derby.shared.common.error.PublicAPI, .StandardException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.context.Context, .ContextService, org.apache.derby.shared.common.i18n.MessageService, org.apache.derby.iapi.services.loader.ClassFactory, .ClassFactoryContext, org.apache.derby.iapi.sql.compile.OptTrace, org.apache.derby.iapi.sql.dictionary.OptionalTool

OptionalTool for tracing the Optimizer.

Constructor Summary

AccessConstructor and Description
public
OptimizerTracer()

0-arg constructor required by the OptionalTool contract

Method Summary

Modifier and TypeMethod and Description
private SQLException
private static Context
getContext(final String contextID)

Must be private so that user code can't call this entry point.

public void
loadTool(String... configurationParameters)

Implements org.apache.derby.iapi.sql.dictionary.OptionalTool.loadTool.

Turns on optimizer tracing.

public void
unloadTool(final String... configurationParameters)

Implements org.apache.derby.iapi.sql.dictionary.OptionalTool.unloadTool.

Print the optimizer trace and turn off tracing.

private SQLException
wrap(Throwable t)

Wrap an exception in a SQLException

private SQLException
wrap(String errorMessage)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

OptimizerTracerback to summary
public OptimizerTracer()

0-arg constructor required by the OptionalTool contract

Method Detail

cantInstantiateback to summary
private SQLException cantInstantiate(String className)
getContextback to summary
private static Context getContext(final String contextID)

Must be private so that user code can't call this entry point.

loadToolback to summary
public void loadTool(String... configurationParameters) throws SQLException

Implements org.apache.derby.iapi.sql.dictionary.OptionalTool.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.
unloadToolback to summary
public void unloadTool(final String... configurationParameters) throws SQLException

Implements org.apache.derby.iapi.sql.dictionary.OptionalTool.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.
wrapback to summary
private SQLException wrap(Throwable t)

Wrap an exception in a SQLException

wrapback to summary
private SQLException wrap(String errorMessage)