DODS 6.5 API

org.enhydra.dods.statistics
Interface CacheStatistics

All Known Subinterfaces:
DODSCache
All Known Implementing Classes:
DODSHashMap, DODSLinkedHashCache, DODSLRUCache

public interface CacheStatistics

This interface provides information about query statistics of the cache (DO (data object), simple query or complex query cache).

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

Method Summary
 void clearStatistics()
          Clears statistics.
 int getCacheAccessNum()
          Returns total number of times the cache was accessed.
 int getCacheHitsNum()
          Returns number of cache accesses that were successful.
 double getCacheHitsPercents()
          Returns how many cache accesses were successful.
 double getUsedPercents()
          Returns how much cache is currently used.
 void incrementCacheAccessNum(int num)
          Increases total number of times the cache was accessed.
 void incrementCacheHitsNum(int num)
          Increases of cache accesses that were successful.
 void setCacheAccessNum(int num)
          Sets total number of times the cache was accessed.
 void setCacheHitsNum(int cacheHitsNum)
          Sets number of qof cache accesses that were successful.
 

Method Detail

getCacheAccessNum

public int getCacheAccessNum()
Returns total number of times the cache was accessed.

Returns:
total number of times the cache was accessed.

setCacheAccessNum

public void setCacheAccessNum(int num)
Sets total number of times the cache was accessed.

Parameters:
num - Total number of times the cache was accessed.

incrementCacheAccessNum

public void incrementCacheAccessNum(int num)
Increases total number of times the cache was accessed.


getCacheHitsNum

public int getCacheHitsNum()
Returns number of cache accesses that were successful.

Returns:
Number of cache accesses that were successful.

setCacheHitsNum

public void setCacheHitsNum(int cacheHitsNum)
Sets number of qof cache accesses that were successful.

Parameters:
cacheHitsNum - Number of of cache accesses that were successful.

incrementCacheHitsNum

public void incrementCacheHitsNum(int num)
Increases of cache accesses that were successful.


getUsedPercents

public double getUsedPercents()
Returns how much cache is currently used. This value is given in percents. If cache is unbounded, method returns 100%.

Returns:
Percents - how much cache is currently used.

getCacheHitsPercents

public double getCacheHitsPercents()
Returns how many cache accesses were successful. This value is given in percents.

Returns:
Percents - how many cache accesses were successful.

clearStatistics

public void clearStatistics()
Clears statistics. Sets everything to null.


DODS 6.5 API