EAF 7.4 API

org.enhydra.dods.statistics
Interface Statistics


public interface Statistics

This interface provides information about table and its statistics.

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

Field Summary
static int CACHE_STATISTICS
          When there is only data object cache (there are no query caches), statistics is CACHE_STATISTICS (contains information about tables and data object cache).
static int QUERY_CACHE_STATISTICS
          When there are both data object and query caches, statistics is QUERY_CACHE_STATISTICS (contains information about tables, data object and query caches).
static int TABLE_STATISTICS
          When there are no caches (data object and query caches), statistics is TABLE_STATISTICS (contains only information about tables).
 
Method Summary
 void clear()
          Clears DO, simple query and complex query statistics.
 CacheStatistics getCacheStatistics(int type)
          Returns query statistics for : DO (data object) cache when cache has value 0 (value rg.enhydra.dods.cache.CacheConstants.DATA_CACHE) simple query cache when cache has value 1 (value org.enhydra.dods.cache.CacheConstants.SIMPLE_QUERY_CACHE) complex query cache when cache has value 2 (org.enhydra.dods.cache.CacheConstants.COMPLEX_QUERY_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 query by oid.
 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 (TABLE_STATISTICS, CACHE_STATISTICS, or QUERY_CACHE_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 statements 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.
 

Field Detail

TABLE_STATISTICS

static final int TABLE_STATISTICS
When there are no caches (data object and query caches), statistics is TABLE_STATISTICS (contains only information about tables).

See Also:
Constant Field Values

CACHE_STATISTICS

static final int CACHE_STATISTICS
When there is only data object cache (there are no query caches), statistics is CACHE_STATISTICS (contains information about tables and data object cache).

See Also:
Constant Field Values

QUERY_CACHE_STATISTICS

static final int QUERY_CACHE_STATISTICS
When there are both data object and query caches, statistics is QUERY_CACHE_STATISTICS (contains information about tables, data object and query caches).

See Also:
Constant Field Values
Method Detail

getStatisticsType

int getStatisticsType()
Returns type of the statistics (TABLE_STATISTICS, CACHE_STATISTICS, or QUERY_CACHE_STATISTICS).

Returns:
Type of statistics (0 if statistics is TABLE_STATISTICS, 1 if statistics is CACHE_STATISTICS, or 2 if statistics is QUERY_CACHE_STATISTICS.

getInsertNum

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

Returns:
Number of insert statements performed on the table.

setInsertNum

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

Parameters:
newInsertNum - New number of insert statements performed on the table.

incrementInsertNum

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


getUpdateNum

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

Returns:
Number of update statements performed on the table.

setUpdateNum

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

Parameters:
newUpdateNum - New number of update statements performed on the table.

incrementUpdateNum

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


getDeleteNum

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

Returns:
Number of delete statements performed on the table.

setDeleteNum

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

Parameters:
newDeleteNum - New number of delete statements performed on the table.

incrementDeleteNum

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


getDMLNum

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

Returns:
Number of DML operations performed on the table.

getLazyLoadingNum

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

Returns:
Number of lazy loadings performed on the table.

setLazyLoadingNum

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

Parameters:
newLazyLoadingNum - New number of lazy loadings performed on the table.

incrementLazyLoadingNum

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


getStartTime

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

Returns:
Time when the statistics was started.

setStartTime

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

Parameters:
startTime - Time when the statistics starts.

getStopTime

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

Returns:
Time when the statistics was stopped.

setStopTime

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

Parameters:
stopTime - time when the statistics stops.

stopTime

void stopTime()
Sets stop time to current time.


getQueryNum

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.

Returns:
Total number of non-oid queries performed on the table.

setQueryNum

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.

Parameters:
newQueryNum - New total number of non-oid queries performed on the table.

incrementQueryNum

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.


getQueryByOIdNum

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.

Returns:
Total number of queries by oid performed on the table.

setQueryByOIdNum

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.

Parameters:
newQueryByOIdNum - New total number of queries by oid performed on the table.

incrementQueryByOIdNum

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.


getQueryAverageTime

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.

Returns:
Average time needed for executing non-oid query.

updateQueryAverageTime

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.

Parameters:
newTime - New query time in miliseconds.

getQueryByOIdAverageTime

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

Returns:
Average time needed for executing oid query.

updateQueryByOIdAverageTime

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.

Parameters:
newTime - New query time in miliseconds for no queries by OId.
no - Number of queries by OId.

clear

void clear()
Clears DO, simple query and complex query statistics.


getCacheStatistics

CacheStatistics getCacheStatistics(int type)
Returns query statistics for : DO (data object) cache when cache has value 0 (value rg.enhydra.dods.cache.CacheConstants.DATA_CACHE) simple query cache when cache has value 1 (value org.enhydra.dods.cache.CacheConstants.SIMPLE_QUERY_CACHE) complex query cache when cache has value 2 (org.enhydra.dods.cache.CacheConstants.COMPLEX_QUERY_CACHE)

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 for DO (data object) cache, simple query or complex query cache.

EAF 7.4 API