DODS 7.3 API

org.enhydra.dods.statistics
Class TableStatistics

java.lang.Object
  extended by org.enhydra.dods.statistics.TableStatistics
All Implemented Interfaces:
org.enhydra.dods.statistics.Statistics

public class TableStatistics
extends java.lang.Object
implements org.enhydra.dods.statistics.Statistics

This class provides information about table and its statistics.

Version:
2.0 15.06.2003.
Author:
Tanja Jovanovic, Nenad Vico, Zorica Suvajdzin

Field Summary
protected  int averageQueryByOIdTime
          Average time for executing queries by oid in milliseconds.
protected  int averageQueryTime
          Average time for executing non-oid queries in milliseconds.
protected  int deleteNum
          Number of delete statements performed on the table.
protected  int insertNum
          Number of insert statements performed on the table.
protected  int lazyLoadingNum
          Number of lazy loadings performed on the table.
protected  int queryByOIdNum
          Total number of queries by oid performed on the table.
protected  int queryNum
          Total number of non-oid queries performed on the table.
protected  java.util.Date startTime
          Time when the statistics was started.
protected  java.util.Date stopTime
          Time when the statistics was stopped.
protected  int updateNum
          Number of update statements performed on the table.
 
Fields inherited from interface org.enhydra.dods.statistics.Statistics
CACHE_STATISTICS, QUERY_CACHE_STATISTICS, TABLE_STATISTICS
 
Constructor Summary
TableStatistics()
          Constructor().
 
Method Summary
 void clear()
          Clears statistics.
 void clears()
          Clears statistics.
 org.enhydra.dods.statistics.CacheStatistics getCacheStatistics(int type)
          Returns query statistics for table without cache.
 int getDeleteNum()
          Returns number of delete statements performed on the table.
 int getDMLNum()
          Returns number of DML operations (inserts, updates and deletes) performed on the table.
 int getInsertNum()
          Returns number of insert statements performed on the table.
 int getLazyLoadingNum()
          Returns number of lazy loadings performed on the table.
 int getQueryAverageTime()
          Returns average time needed for executing non-oid query.
 int getQueryByOIdAverageTime()
          Returns average time needed for executing oid query.
 int getQueryByOIdNum()
          Returns total number of queries by oid performed on the table.
 int getQueryNum()
          Returns total number of non-oid queries performed on the table.
 java.util.Date getStartTime()
          Returns time when the statistics was started.
 int getStatisticsType()
          Returns type of the statistics.
 java.util.Date getStopTime()
          Returns time when the statistics was stopped.
 int getUpdateNum()
          Returns number of update statements performed on the table.
 void incrementDeleteNum()
          Increases number of delete statements performed on table.
 void incrementInsertNum()
          Increases number of insert statemenst performed on the table.
 void incrementLazyLoadingNum()
          Increases number of lazy loadings performed on the table for one.
 void incrementQueryByOIdNum()
          Increases total number of queries by oid performed on the table for one.
 void incrementQueryNum()
          Increases total number of non-oid queries performed on the table.
 void incrementUpdateNum()
          Increases number of update statements performed on the table.
 void setDeleteNum(int newDeleteNum)
          Sets number of delete statements performed on the table.
 void setInsertNum(int newInsertNum)
          Sets number of insert statements performed on the table.
 void setLazyLoadingNum(int newLazyLoadingNum)
          Sets number of lazy loadings performed on the table.
 void setQueryByOIdNum(int newQueryByOIdNum)
          Sets total number of queries by oid performed on the table.
 void setQueryNum(int newQueryNum)
          Sets total number of non-oid queries performed on the table.
 void setStartTime(java.util.Date startTime)
          Sets time when the statistics starts.
 void setStopTime(java.util.Date stopTime)
          Sets time when the statistics stops.
 void setUpdateNum(int newUpdateNum)
          Sets number of update statements performed on the table.
 void stopTime()
          Sets stop time to current time.
 void updateQueryAverageTime(int newTime)
          Updates average time needed for executing non-oid queries.
 void updateQueryByOIdAverageTime(int newTime, int no)
          Updates average time for executing OId queries and increments number of them by paramether no.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

insertNum

protected int insertNum
Number of insert statements performed on the table.


updateNum

protected int updateNum
Number of update statements performed on the table.


deleteNum

protected int deleteNum
Number of delete statements performed on the table.


lazyLoadingNum

protected int lazyLoadingNum
Number of lazy loadings performed on the table.


startTime

protected java.util.Date startTime
Time when the statistics was started.


stopTime

protected java.util.Date stopTime
Time when the statistics was stopped.


queryNum

protected int queryNum
Total number of non-oid queries performed on the table. Query by oid is query which "where" clause contains request for DO with specified oid. Non-oid query is any other query.


queryByOIdNum

protected int queryByOIdNum
Total number of queries by oid performed on the table. Query by oid is query which "where" clause contains request for DO with specified oid.


averageQueryTime

protected int averageQueryTime
Average time for executing non-oid queries in milliseconds. Query by oid is query which "where" clause contains request for DO with specified oid. Non-oid query is any other query.


averageQueryByOIdTime

protected int averageQueryByOIdTime
Average time for executing queries by oid in milliseconds. Query by oid is query which "where" clause contains request for DO with specified oid.

Constructor Detail

TableStatistics

public TableStatistics()
Constructor().

Method Detail

getStatisticsType

public int getStatisticsType()
Returns type of the statistics. In this case, this is TABLE_STATISTICS.

Specified by:
getStatisticsType in interface org.enhydra.dods.statistics.Statistics
Returns:
Type of the statistics: TABLE_STATISTICS.

getInsertNum

public int getInsertNum()
Returns number of insert statements performed on the table.

Specified by:
getInsertNum in interface org.enhydra.dods.statistics.Statistics
Returns:
Number of insert statements performed on the table.

setInsertNum

public void setInsertNum(int newInsertNum)
Sets number of insert statements performed on the table.

Specified by:
setInsertNum in interface org.enhydra.dods.statistics.Statistics
Parameters:
newInsertNum - New number of insert statements performed on the table.

incrementInsertNum

public void incrementInsertNum()
Increases number of insert statemenst performed on the table.

Specified by:
incrementInsertNum in interface org.enhydra.dods.statistics.Statistics

getUpdateNum

public int getUpdateNum()
Returns number of update statements performed on the table.

Specified by:
getUpdateNum in interface org.enhydra.dods.statistics.Statistics
Returns:
Number of update statements performed on the table.

setUpdateNum

public void setUpdateNum(int newUpdateNum)
Sets number of update statements performed on the table.

Specified by:
setUpdateNum in interface org.enhydra.dods.statistics.Statistics
Parameters:
newUpdateNum - New number of update statements performed on the table.

incrementUpdateNum

public void incrementUpdateNum()
Increases number of update statements performed on the table.

Specified by:
incrementUpdateNum in interface org.enhydra.dods.statistics.Statistics

getDeleteNum

public int getDeleteNum()
Returns number of delete statements performed on the table.

Specified by:
getDeleteNum in interface org.enhydra.dods.statistics.Statistics
Returns:
Number of delete statements performed on the table.

setDeleteNum

public void setDeleteNum(int newDeleteNum)
Sets number of delete statements performed on the table.

Specified by:
setDeleteNum in interface org.enhydra.dods.statistics.Statistics
Parameters:
newDeleteNum - New number of delete statements performed on the table.

incrementDeleteNum

public void incrementDeleteNum()
Increases number of delete statements performed on table.

Specified by:
incrementDeleteNum in interface org.enhydra.dods.statistics.Statistics

getDMLNum

public int getDMLNum()
Returns number of DML operations (inserts, updates and deletes) performed on the table.

Specified by:
getDMLNum in interface org.enhydra.dods.statistics.Statistics
Returns:
Number of DML operations performed on the table.

getLazyLoadingNum

public int getLazyLoadingNum()
Returns number of lazy loadings performed on the table.

Specified by:
getLazyLoadingNum in interface org.enhydra.dods.statistics.Statistics
Returns:
Number of lazy loadings performed on the table.

setLazyLoadingNum

public void setLazyLoadingNum(int newLazyLoadingNum)
Sets number of lazy loadings performed on the table.

Specified by:
setLazyLoadingNum in interface org.enhydra.dods.statistics.Statistics
Parameters:
newLazyLoadingNum - New number of lazy loadings performed on the table.

incrementLazyLoadingNum

public void incrementLazyLoadingNum()
Increases number of lazy loadings performed on the table for one.

Specified by:
incrementLazyLoadingNum in interface org.enhydra.dods.statistics.Statistics

getStartTime

public java.util.Date getStartTime()
Returns time when the statistics was started.

Specified by:
getStartTime in interface org.enhydra.dods.statistics.Statistics
Returns:
Time when the statistics was started.

setStartTime

public void setStartTime(java.util.Date startTime)
Sets time when the statistics starts.

Specified by:
setStartTime in interface org.enhydra.dods.statistics.Statistics
Parameters:
startTime - Time when the statistics starts.

getStopTime

public java.util.Date getStopTime()
Returns time when the statistics was stopped.

Specified by:
getStopTime in interface org.enhydra.dods.statistics.Statistics
Returns:
Time when the statistics was stopped.

setStopTime

public void setStopTime(java.util.Date stopTime)
Sets time when the statistics stops.

Specified by:
setStopTime in interface org.enhydra.dods.statistics.Statistics
Parameters:
stopTime - time when the statistics was stops.

stopTime

public void stopTime()
Sets stop time to current time.

Specified by:
stopTime in interface org.enhydra.dods.statistics.Statistics

getQueryNum

public int getQueryNum()
Returns total number of non-oid queries performed on the table. Query by oid is query which "where" clause contains request for DO with specified oid. Non-oid query is any other query.

Specified by:
getQueryNum in interface org.enhydra.dods.statistics.Statistics
Returns:
Total number of non-oid queries performed on the table.

setQueryNum

public void setQueryNum(int newQueryNum)
Sets total number of non-oid queries performed on the table. Query by oid is query which "where" clause contains request for DO with specified oid. Non-oid query is any other query.

Specified by:
setQueryNum in interface org.enhydra.dods.statistics.Statistics
Parameters:
newQueryNum - New total number of non-oid queries performed on the table.

incrementQueryNum

public void incrementQueryNum()
Increases total number of non-oid queries performed on the table. Query by oid is query which "where" clause contains request for DO with specified oid. Non-oid query is any other query.

Specified by:
incrementQueryNum in interface org.enhydra.dods.statistics.Statistics

getQueryByOIdNum

public int getQueryByOIdNum()
Returns total number of queries by oid performed on the table. Query by oid is query which "where" clause contains request for DO with specified oid.

Specified by:
getQueryByOIdNum in interface org.enhydra.dods.statistics.Statistics
Returns:
Total number of queries by oid performed performed on the table.

setQueryByOIdNum

public void setQueryByOIdNum(int newQueryByOIdNum)
Sets total number of queries by oid performed on the table. Query by oid is query which "where" clause contains request for DO with specified oid.

Specified by:
setQueryByOIdNum in interface org.enhydra.dods.statistics.Statistics
Parameters:
newQueryByOIdNum - New total number of queries by oid performed on the table.

incrementQueryByOIdNum

public void incrementQueryByOIdNum()
Increases total number of queries by oid performed on the table for one. Query by oid is query which "where" clause contains request for DO with specified oid.

Specified by:
incrementQueryByOIdNum in interface org.enhydra.dods.statistics.Statistics

getQueryAverageTime

public int getQueryAverageTime()
Returns average time needed for executing non-oid query. Query by oid is query which "where" clause contains request for DO with specified oid. Non-oid query is any other query.

Specified by:
getQueryAverageTime in interface org.enhydra.dods.statistics.Statistics
Returns:
Average time needed for executing non-oid query.

updateQueryAverageTime

public void updateQueryAverageTime(int newTime)
Updates average time needed for executing non-oid queries. Query by oid is query which "where" clause contains request for DO with specified oid. Non-oid query is any other query.

Specified by:
updateQueryAverageTime in interface org.enhydra.dods.statistics.Statistics
Parameters:
newTime - New query time in miliseconds.

getQueryByOIdAverageTime

public int getQueryByOIdAverageTime()
Returns average time needed for executing oid query. Query by oid is query which "where" clause contains request for DO with specified oid.

Specified by:
getQueryByOIdAverageTime in interface org.enhydra.dods.statistics.Statistics
Returns:
Average time needed for executing oid query.

updateQueryByOIdAverageTime

public void updateQueryByOIdAverageTime(int newTime,
                                        int no)
Updates average time for executing OId queries and increments number of them by paramether no. Query by oid is query which "where" clause contains request for DO with specified oid.

Specified by:
updateQueryByOIdAverageTime in interface org.enhydra.dods.statistics.Statistics
Parameters:
newTime - New query time in miliseconds for no queries by OId.
no - Number of queries by OId.

clears

public void clears()
Clears statistics.


clear

public void clear()
Clears statistics.

Specified by:
clear in interface org.enhydra.dods.statistics.Statistics

getCacheStatistics

public org.enhydra.dods.statistics.CacheStatistics getCacheStatistics(int type)
Returns query statistics for table without cache. Since this is table without cache parameter type has no meaning.

Specified by:
getCacheStatistics in interface org.enhydra.dods.statistics.Statistics
Parameters:
type - Value 0 (org.enhydra.dods.cache.CacheConstants.DATA_CACHE) for DO (data object) cache, value 1 (org.enhydra.dods.cache.CacheConstants.SIMPLE_QUERY_CACHE) for simple query cache and value 2 (org.enhydra.dods.cache.CacheConstants.COMPLEX_QUERY_CACHE) for complex query cache.
Returns:
Query statistics table.

DODS 7.3 API