01: /*
02: * Enhydra Java Application Server Project
03: *
04: * The contents of this file are subject to the Enhydra Public License
05: * Version 1.1 (the "License"); you may not use this file except in
06: * compliance with the License. You may obtain a copy of the License on
07: * the Enhydra web site ( http://www.enhydra.org/ ).
08: *
09: * Software distributed under the License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11: * the License for the specific terms governing rights and limitations
12: * under the License.
13: *
14: * The Initial Developer of the Enhydra Application Server is Lutris
15: * Technologies, Inc. The Enhydra Application Server and portions created
16: * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17: * All Rights Reserved.
18: *
19: * Contributor(s):
20: *
21: */
22:
23: package org.enhydra.dods.statistics;
24:
25: /**
26: * This interface provides information about query statistics of the cache
27: * (DO (data object), simple query or complex query cache).
28: *
29: * @author Tanja Jovanovic
30: * @author Nenad Vico
31: * @author Zorica Suvajdzin
32: * @version 2.0 15.06.2003.
33: */
34:
35: public interface CacheStatistics {
36:
37: /**
38: * Returns total number of times the cache was accessed.
39: *
40: * @return total number of times the cache was accessed.
41: */
42: public int getCacheAccessNum();
43:
44: /**
45: * Sets total number of times the cache was accessed.
46: *
47: * @param num Total number of times the cache was accessed.
48: */
49: public void setCacheAccessNum(int num);
50:
51: /**
52: * Increases total number of times the cache was accessed.
53: */
54: public void incrementCacheAccessNum(int num);
55:
56: /**
57: * Returns number of cache accesses that were successful.
58: *
59: * @return Number of cache accesses that were successful.
60: */
61: public int getCacheHitsNum();
62:
63: /**
64: * Sets number of qof cache accesses that were successful.
65: *
66: * @param cacheHitsNum Number of of cache accesses that were successful.
67: */
68: public void setCacheHitsNum(int cacheHitsNum);
69:
70: /**
71: * Increases of cache accesses that were successful.
72: */
73: public void incrementCacheHitsNum(int num);
74:
75: /**
76: * Returns how much cache is currently used. This value is given in percents.
77: * If cache is unbounded, method returns 100%.
78: *
79: * @return Percents - how much cache is currently used.
80:
81: */
82: public double getUsedPercents();
83:
84: /**
85: * Returns how many cache accesses were successful.
86: * This value is given in percents.
87: *
88: * @return Percents - how many cache accesses were successful.
89: */
90: public double getCacheHitsPercents();
91:
92: /**
93: * Clears statistics. Sets everything to null.
94: */
95: public void clearStatistics();
96: }
|