Package org.apache.derby.iapi.services.stream

Examples of org.apache.derby.iapi.services.stream.HeaderPrintWriter


    public void doXPLAIN(RunTimeStatistics rss, Activation activation) {
        LanguageConnectionContext lcc;
        try {
            lcc = ConnectionUtil.getCurrentLCC();
            HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
            if (istream != null){
                istream.printlnWithHeader(LanguageConnectionContext.xidStr +
                      lcc.getTransactionExecute().getTransactionIdString() +
                      "), " +
                      LanguageConnectionContext.lccStr +
                      lcc.getInstanceNumber() +
                      "), " +
View Full Code Here


                         getExecutionFactory().getResultSetStatisticsFactory();

        lcc.setRunTimeStatisticsObject(
          rssf.getRunTimeStatistics(activation, this, subqueryTrackingArray));

        HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
        if (istream != null)
        {
          istream.printlnWithHeader(LanguageConnectionContext.xidStr +
                        lcc.getTransactionExecute().getTransactionIdString() +
                        "), " +
                        LanguageConnectionContext.lccStr +
                        lcc.getInstanceNumber() +
                        "), " +
View Full Code Here

        endExecutionTime = getCurrentTimeMillis();
               
        lcc.setRunTimeStatisticsObject(
          lcc.getLanguageConnectionFactory().getExecutionFactory().getResultSetStatisticsFactory().getRunTimeStatistics(activation, this, subqueryTrackingArray));

        HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
        if (istream != null)
        {
          istream.printlnWithHeader(LanguageConnectionContext.xidStr +
                        lcc.getTransactionExecute().getTransactionIdString() +
                        "), " +
                        LanguageConnectionContext.lccStr +
                        lcc.getInstanceNumber() +
                        "), " +
View Full Code Here

        logError( "\nERROR " +  se.getSQLState() + ": "  + se.getMessage() + "\n", se );
    }
    private static  void    logError( String errorMessage, Throwable t )
    {
      HeaderPrintWriter errorStream = Monitor.getStream();
      if (errorStream == null) {
        t.printStackTrace();
        return;
      }
      ErrorStringBuilder  errorStringBuilder = new ErrorStringBuilder(errorStream.getHeader());
      errorStringBuilder.append( errorMessage );
      errorStringBuilder.stackTrace( t );
      errorStream.print(errorStringBuilder.get().toString());
      errorStream.flush();
      errorStringBuilder.reset();
    }
View Full Code Here

      LanguageConnectionContext lccToUse = activation.getLanguageConnectionContext();

       if (lccToUse.getLogStatementText())
      {
        HeaderPrintWriter istream = Monitor.getStream();
        String xactId = lccToUse.getTransactionExecute().getActiveStateTxIdString();
        String pvsString = "";
        ParameterValueSet pvs = activation.getParameterValueSet();
        if (pvs != null && pvs.getParameterCount() > 0)
        {
          pvsString = " with " + pvs.getParameterCount() +
              " parameters " + pvs.toString();
        }
        istream.printlnWithHeader(LanguageConnectionContext.xidStr +
                      xactId +
                      "), " +
                      LanguageConnectionContext.lccStr +
                      lccToUse.getInstanceNumber() +
                      "), " +
View Full Code Here

                // (ScanManager) cast is occasionally causing a
                // java.lang.ClassCastException.

                if (!(o instanceof ScanManager))
                {
                    HeaderPrintWriter istream = Monitor.getStream();
                   
                    if (o == null)
                        istream.println("next element was null\n");
                    else
                        istream.println("non ScanManager on list: " + o);

                    istream.println(
                        "Current list of open scans: " +  debugOpened());
                }
            }
      ScanManager sm = (ScanManager) o;
            sm.savePosition(conglom, page);
View Full Code Here

        rssf = ec.getResultSetStatisticsFactory();

        lcc.setRunTimeStatisticsObject(
          rssf.getRunTimeStatistics(activation, this, subqueryTrackingArray));

        HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
        if (istream != null)
        {
          istream.printlnWithHeader(LanguageConnectionContext.xidStr +
                        lcc.getTransactionExecute().getTransactionIdString() +
                        "), " +
                        LanguageConnectionContext.lccStr +
                        lcc.getInstanceNumber() +
                        "), " +
View Full Code Here

          endExecutionTime = getCurrentTimeMillis();

          lcc.setRunTimeStatisticsObject(
            lcc.getExecutionContext().getResultSetStatisticsFactory().getRunTimeStatistics(activation, this, subqueryTrackingArray));

          HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
          if (istream != null)
          {
            istream.printlnWithHeader(LanguageConnectionContext.xidStr +
                          lcc.getTransactionExecute().getTransactionIdString() +
                          "), " +
                          LanguageConnectionContext.lccStr +
                          lcc.getInstanceNumber() +
                          "), " +
View Full Code Here

                         getExecutionFactory().getResultSetStatisticsFactory();

        lcc.setRunTimeStatisticsObject(
          rssf.getRunTimeStatistics(activation, this, subqueryTrackingArray));

        HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
        if (istream != null)
        {
          istream.printlnWithHeader(LanguageConnectionContext.xidStr +
                        lcc.getTransactionExecute().getTransactionIdString() +
                        "), " +
                        LanguageConnectionContext.lccStr +
                        lcc.getInstanceNumber() +
                        "), " +
View Full Code Here

        endExecutionTime = getCurrentTimeMillis();
               
        lcc.setRunTimeStatisticsObject(
          lcc.getLanguageConnectionFactory().getExecutionFactory().getResultSetStatisticsFactory().getRunTimeStatistics(activation, this, subqueryTrackingArray));

        HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
        if (istream != null)
        {
          istream.printlnWithHeader(LanguageConnectionContext.xidStr +
                        lcc.getTransactionExecute().getTransactionIdString() +
                        "), " +
                        LanguageConnectionContext.lccStr +
                        lcc.getInstanceNumber() +
                        "), " +
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.stream.HeaderPrintWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.