DODS 5.1 API

org.enhydra.dods.statistics
Class TableStatistics

java.lang.Object
  |
  +--org.enhydra.dods.statistics.TableStatistics
All Implemented Interfaces:
Statistics
Direct Known Subclasses:
QueryCacheStatistics

public class TableStatistics
extends java.lang.Object
implements Statistics

This class provides information about table and its statistics.

Since:
Enhydra5.1
Version:
1.0.0.0
Author:
Tanja Jovanovic
, Nenad Vico

Field Summary
protected  int averageQueryByOIdTime
          Average time for executing non-oid queries in milliseconds .
protected  int averageQueryTime
          Average time for executing non-oid queries in milliseconds .
protected  int complexQueryNum
          Number of complex queries performed on the table.
protected  int deleteNum
          Number of delete statement performed on table.
protected  int insertNum
          Number of insert statement performed on table.
protected  int lazyLoadingNum
          Number of lazy loadings performed on table.
protected  int queryByOIdNum
          Total number of queries by oid performed on the table.
protected  int queryNum
          Total number of queries performed on the table.
protected  int simpleQueryNum
          Number of simple queries performed on the table.
protected  java.util.Date startTime
          Time when statistics started.
protected  java.util.Date stopTime
          Time when statistics has been stopped.
protected  java.lang.String tableName
          Name of the table.
protected  int updateNum
          Number of update statement performed on table.
 
Constructor Summary
TableStatistics(java.lang.String name)
          Constructor which initialize start time of the statistics.
 
Method Summary
 java.lang.String getCacheType()
          Returns cache type.
 int getComplexQueryNum()
          Returns number of complex queries performed on the table.
 int getDeleteNum()
          Returns number of delete statement performed on table.
 int getDMLNum()
          Returns number of DML operation performed on table.
 int getInsertNum()
          Returns number of insert statement performed on table.
 int getLazyLoadingNum()
          Returns number of lazy loadings performed on table.
 int getQueryAverageTime()
          Returns average time for executing non-oid query.
 int getQueryByOIdAverageTime()
          Returns average time for executing oid query.
 int getQueryByOIdNum()
          Returns total number of queries by oid performed on the table.
 int getQueryNum()
          Returns total number of queries performed on the table.
 int getSimpleQueryNum()
          Returns number of simple queries performed on the table.
 java.util.Date getStartTime()
          Returns time when statistics started.
 java.util.Date getStopTime()
          Returns time when statistics has been stopped.
 java.lang.String getTableName()
          Returns table name.
 int getUpdateNum()
          Returns number of update statement performed on table.
 void incrementComplexQueryNum()
          Increases number of complex queries performed on the table for one.
 void incrementDeleteNum()
          Increases number of delete statement performed on table.
 void incrementInsertNum()
          Increases number of insert statement performed on table.
 void incrementLazyLoadingNum()
          Increases number of lazy loadings performed on table for one.
 void incrementQueryByOIdNum()
          Increases total number of queries by oid performed on the table for one.
 void incrementQueryNum()
          Increases total number of queries performed on the table for one.
 void incrementSimpleQueryNum()
          Increases number of simple queries performed on the table for one.
 void incrementUpdateNum()
          Increases number of update statement performed on table.
 void setCacheType(java.lang.String type)
          Sets cache type.
 void setComplexQueryNum(int complexQueryNum)
          Sets number of complex queries performed on the table.
 void setDeleteNum(int deleteNum)
          Sets number of delete statement performed on table.
 void setInsertNum(int insertNum)
          Sets number of insert statement performed on table.
 void setLazyLoadingNum(int lazyLoadingNum)
          Sets number of lazy loadings performed on table.
 void setQueryByOIdNum(int queryByOIdNum)
          Sets total number of queries by oid performed on the table.
 void setQueryNum(int queryNum)
          Sets total number of queries performed on the table.
 void setSimpleQueryNum(int simpleQueryNum)
          Sets number of simple queries performed on the table.
 void setStartTime(java.util.Date startTime)
          Sets time when statistics started.
 void setStopTime(java.util.Date stopTime)
          Sets time when statistics has been stopped.
 void setTableName(java.lang.String name)
          Sets table name.
 void setUpdateNum(int updateNum)
          Sets number of update statement performed on table.
 void show()
          Shows content of this class.
 void stopTime()
          Sets stop time to current time.
 void updateQueryAverageTime(int newTime)
          Updates average time for executing non-oid queries.
 void updateQueryByOIdAverageTime(int newTime, int no)
          Updates average time for executing OId queries and inctrement 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

tableName

protected java.lang.String tableName
Name of the table.


queryNum

protected int queryNum
Total number of queries performed on the table.


queryByOIdNum

protected int queryByOIdNum
Total number of queries by oid performed on the table.


simpleQueryNum

protected int simpleQueryNum
Number of simple queries performed on the table.


complexQueryNum

protected int complexQueryNum
Number of complex queries performed on the table.


insertNum

protected int insertNum
Number of insert statement performed on table.


updateNum

protected int updateNum
Number of update statement performed on table.


deleteNum

protected int deleteNum
Number of delete statement performed on table.


lazyLoadingNum

protected int lazyLoadingNum
Number of lazy loadings performed on table.


startTime

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


stopTime

protected java.util.Date stopTime
Time when statistics has been stopped.


averageQueryTime

protected int averageQueryTime
Average time for executing non-oid queries in milliseconds .


averageQueryByOIdTime

protected int averageQueryByOIdTime
Average time for executing non-oid queries in milliseconds .

Constructor Detail

TableStatistics

public TableStatistics(java.lang.String name)
Constructor which initialize start time of the statistics.

Method Detail

getTableName

public java.lang.String getTableName()
Returns table name.

Specified by:
getTableName in interface Statistics
Returns:
table name.

setTableName

public void setTableName(java.lang.String name)
Sets table name.

Specified by:
setTableName in interface Statistics
Parameters:
name - table name.

getQueryNum

public int getQueryNum()
Returns total number of queries performed on the table.

Specified by:
getQueryNum in interface Statistics
Returns:
total number of queries performed on the table.

setQueryNum

public void setQueryNum(int queryNum)
Sets total number of queries performed on the table.

Specified by:
setQueryNum in interface Statistics
Parameters:
queryNum - total number of queries performed on the table.

incrementQueryNum

public void incrementQueryNum()
Increases total number of queries performed on the table for one.

Specified by:
incrementQueryNum in interface Statistics

getQueryByOIdNum

public int getQueryByOIdNum()
Returns total number of queries by oid performed on the table.

Specified by:
getQueryByOIdNum in interface Statistics
Returns:
total number of queries performed on the table.

setQueryByOIdNum

public void setQueryByOIdNum(int queryByOIdNum)
Sets total number of queries by oid performed on the table.

Specified by:
setQueryByOIdNum in interface Statistics

incrementQueryByOIdNum

public void incrementQueryByOIdNum()
Increases total number of queries by oid performed on the table for one.

Specified by:
incrementQueryByOIdNum in interface Statistics

getSimpleQueryNum

public int getSimpleQueryNum()
Returns number of simple queries performed on the table.

Returns:
number simple of queries performed on the table.

setSimpleQueryNum

public void setSimpleQueryNum(int simpleQueryNum)
Sets number of simple queries performed on the table.

Parameters:
simpleQueryNum - number of simple queries performed on the table.

incrementSimpleQueryNum

public void incrementSimpleQueryNum()
Increases number of simple queries performed on the table for one.


getComplexQueryNum

public int getComplexQueryNum()
Returns number of complex queries performed on the table.

Returns:
number complex of queries performed on the table.

setComplexQueryNum

public void setComplexQueryNum(int complexQueryNum)
Sets number of complex queries performed on the table.

Parameters:
complexQueryNum - number of complex queries performed on the table.

incrementComplexQueryNum

public void incrementComplexQueryNum()
Increases number of complex queries performed on the table for one.


getInsertNum

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

Specified by:
getInsertNum in interface Statistics
Returns:
number of insert statement performed on table.

setInsertNum

public void setInsertNum(int insertNum)
Sets number of insert statement performed on table.

Specified by:
setInsertNum in interface Statistics
Parameters:
insertNum - number of insert performed statement performed on tables.

incrementInsertNum

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

Specified by:
incrementInsertNum in interface Statistics

getUpdateNum

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

Specified by:
getUpdateNum in interface Statistics
Returns:
number of update statement performed on table.

setUpdateNum

public void setUpdateNum(int updateNum)
Sets number of update statement performed on table.

Specified by:
setUpdateNum in interface Statistics
Parameters:
updateNum - number of update performed statement performed on table.

incrementUpdateNum

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

Specified by:
incrementUpdateNum in interface Statistics

getDeleteNum

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

Specified by:
getDeleteNum in interface Statistics
Returns:
number of delete statement performed on table

setDeleteNum

public void setDeleteNum(int deleteNum)
Sets number of delete statement performed on table.

Specified by:
setDeleteNum in interface Statistics
Parameters:
deleteNum - number of delete performed statement performed on table.

incrementDeleteNum

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

Specified by:
incrementDeleteNum in interface Statistics

getDMLNum

public int getDMLNum()
Returns number of DML operation performed on table.

Specified by:
getDMLNum in interface Statistics
Returns:
number of DML operation performed on table.

getLazyLoadingNum

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

Specified by:
getLazyLoadingNum in interface Statistics
Returns:
number of lazy loadings performed on table.

setLazyLoadingNum

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

Specified by:
setLazyLoadingNum in interface Statistics

incrementLazyLoadingNum

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

Specified by:
incrementLazyLoadingNum in interface Statistics

getStartTime

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

Specified by:
getStartTime in interface Statistics
Returns:
time when statistics started.

setStartTime

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

Specified by:
setStartTime in interface Statistics
Parameters:
startTime - time when statistics started.

getStopTime

public java.util.Date getStopTime()
Returns time when statistics has been stopped.

Specified by:
getStopTime in interface Statistics
Returns:
time when statistics has been stopped.

setStopTime

public void setStopTime(java.util.Date stopTime)
Sets time when statistics has been stopped.

Specified by:
setStopTime in interface Statistics

stopTime

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

Specified by:
stopTime in interface Statistics

getQueryAverageTime

public int getQueryAverageTime()
Returns average time for executing non-oid query.

Specified by:
getQueryAverageTime in interface Statistics
Returns:
average time for executing non-oid query.

updateQueryAverageTime

public void updateQueryAverageTime(int newTime)
Updates average time for executing non-oid queries.

Specified by:
updateQueryAverageTime in interface Statistics
Parameters:
newTime - new query time in miliseconds.

getQueryByOIdAverageTime

public int getQueryByOIdAverageTime()
Returns average time for executing oid query.

Specified by:
getQueryByOIdAverageTime in interface Statistics
Returns:
average time for executing oid query.

updateQueryByOIdAverageTime

public void updateQueryByOIdAverageTime(int newTime,
                                        int no)
Updates average time for executing OId queries and inctrement number of them by paramether no.

Specified by:
updateQueryByOIdAverageTime in interface Statistics
Parameters:
newTime - new query time in miliseconds for no queries by OId.
no - number of queries by OId.

getCacheType

public java.lang.String getCacheType()
Returns cache type.

Specified by:
getCacheType in interface Statistics
Returns:
cache type

setCacheType

public void setCacheType(java.lang.String type)
Sets cache type.

Specified by:
setCacheType in interface Statistics
Parameters:
type - cache type

show

public void show()
Shows content of this class. Can be used for debugging.


DODS 5.1 API