org.apache.derby.impl.sql
Class GenericPreparedStatement.RowCountStatistics

java.lang.Object
  extended by org.apache.derby.impl.sql.GenericPreparedStatement.RowCountStatistics
Enclosing class:
GenericPreparedStatement

private static class GenericPreparedStatement.RowCountStatistics
extends java.lang.Object

This class holds information about stale plan check interval, execution count and row count statistics for a GenericPreparedStatement. The fields and methods should ideally live in GenericPreparedStatement, not in a separate class. However, triggers clone the GPS on each execution, which means the statistics would be reset on each execution if they lived directly inside GPS. Instead, keep the statistics in an object that can be shared between multiple GPS instances when they are cloned.


Field Summary
private  int executionCount
           
private  java.util.ArrayList rowCounts
           
private  int stalePlanCheckInterval
           
 
Constructor Summary
private GenericPreparedStatement.RowCountStatistics()
           
 
Method Summary
(package private)  long getInitialRowCount(int rsNum, long rowCount)
           
(package private)  int getStalePlanCheckInterval()
           
(package private)  int incrementExecutionCount()
           
(package private)  void reset()
          Reset all the row count statistics.
(package private)  void setStalePlanCheckInterval(int interval)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stalePlanCheckInterval

private int stalePlanCheckInterval

executionCount

private int executionCount

rowCounts

private java.util.ArrayList rowCounts
Constructor Detail

GenericPreparedStatement.RowCountStatistics

private GenericPreparedStatement.RowCountStatistics()
Method Detail

incrementExecutionCount

int incrementExecutionCount()
See Also:
ExecPreparedStatement.incrementExecutionCount()

getInitialRowCount

long getInitialRowCount(int rsNum,
                        long rowCount)
See Also:
ExecPreparedStatement.getInitialRowCount(int, long)

setStalePlanCheckInterval

void setStalePlanCheckInterval(int interval)
See Also:
ExecPreparedStatement.setStalePlanCheckInterval(int)

getStalePlanCheckInterval

int getStalePlanCheckInterval()
See Also:
ExecPreparedStatement.getStalePlanCheckInterval()

reset

void reset()
Reset all the row count statistics.


Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.