org.eigenbase.test.concurrent
Class ConcurrentTestCommandScript.ResultsReader

java.lang.Object
  extended by org.eigenbase.test.concurrent.ConcurrentTestCommandScript.ResultsReader
Enclosing class:
ConcurrentTestCommandScript

private class ConcurrentTestCommandScript.ResultsReader
extends Object


Field Summary
private  long baseTime
           
private  boolean counted
          prefix printed row with its sequence number
private  String[] labels
           
private  int ncols
           
private  int nth
          print every Nth row.
private  PrintWriter out
           
private  boolean timestamped
          prefix printed row with time it was fetched
private  int[] widths
           
 
Constructor Summary
ConcurrentTestCommandScript.ResultsReader(BufferedWriter out)
           
ConcurrentTestCommandScript.ResultsReader(BufferedWriter out, int nth, boolean counted, boolean timestamped)
           
 
Method Summary
private  void indent()
           
(package private)  void prepareFormat(ResultSet rset)
           
private  void printHeaders()
           
private  void printRow(String[] values)
          Prints an output table row.
private  void printRowCount(int count)
           
private  void printSeparator()
          Prints an output table separator.
private  void printTimestamp(long time)
           
(package private)  void read(ResultSet rset, boolean withTimeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private final PrintWriter out

nth

private final int nth
print every Nth row. 1 means all rows, 0 means none.


counted

private final boolean counted
prefix printed row with its sequence number


timestamped

private final boolean timestamped
prefix printed row with time it was fetched


baseTime

private long baseTime

ncols

private int ncols

widths

private int[] widths

labels

private String[] labels
Constructor Detail

ConcurrentTestCommandScript.ResultsReader

ConcurrentTestCommandScript.ResultsReader(BufferedWriter out)

ConcurrentTestCommandScript.ResultsReader

ConcurrentTestCommandScript.ResultsReader(BufferedWriter out,
                                          int nth,
                                          boolean counted,
                                          boolean timestamped)
Method Detail

prepareFormat

void prepareFormat(ResultSet rset)
             throws SQLException
Throws:
SQLException

printHeaders

private void printHeaders()

read

void read(ResultSet rset,
          boolean withTimeout)
    throws SQLException
Throws:
SQLException

printRowCount

private void printRowCount(int count)

printTimestamp

private void printTimestamp(long time)

indent

private void indent()

printSeparator

private void printSeparator()
Prints an output table separator. Something like "+----+--------+".


printRow

private void printRow(String[] values)
Prints an output table row. Something like "| COL1 | COL2 |".