org.eclipse.datatools.enablement.ingres.internal.ui.plan
Class QEPLogExtractor

java.lang.Object
  extended by org.eclipse.datatools.enablement.ingres.internal.ui.plan.QEPLogExtractor

public final class QEPLogExtractor
extends java.lang.Object

This class is responsible for extracting QEP's from the Ingres JDBC driver's logfile. It watches the log file that is defined in the system property "ingres.jdbc.trace.log".

Author:
enrico.schenk@ingres.com

Method Summary
 java.lang.String[] extractLastQEP()
          Reads the log file to the last line and returns the last QEP found.
static QEPLogExtractor getInstance()
           
 void skipAll()
          Reads to the end of the file, without retrieving a QEP.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static QEPLogExtractor getInstance()

skipAll

public void skipAll()
             throws java.io.IOException
Reads to the end of the file, without retrieving a QEP.

Throws:
java.io.IOException

extractLastQEP

public java.lang.String[] extractLastQEP()
                                  throws java.io.IOException
Reads the log file to the last line and returns the last QEP found.

Returns:
String array containing the lines of the QEP. Empty if no QEP was found.
Throws:
java.io.IOException