Public Member Functions | |
CacheStatistics () | |
void | reset () |
int | getCreate () |
int | getDelete () |
int | getDrop () |
int | getHits () |
int | getInsert () |
int | getRemove () |
int | getSelect () |
int | getUnknown () |
int | getUpdate () |
int | getUncacheable () |
void | addCreate () |
void | addDelete () |
void | addDrop () |
void | addHits () |
void | addInsert () |
void | addRemove () |
void | addSelect () |
void | addUnknown () |
void | addUpdate () |
void | addUncacheable () |
String[] | getCacheStatsData () |
long | getCacheHitRatio () |
Definition at line 35 of file CacheStatistics.java.
|
Creates a new CacheStatistics object. Definition at line 52 of file CacheStatistics.java. 00053 { 00054 select = new Stats("select"); 00055 hits = new Stats("hits"); 00056 insert = new Stats("insert"); 00057 update = new Stats("update"); 00058 uncacheable = new Stats("uncacheable"); 00059 delete = new Stats("delete"); 00060 unknown = new Stats("unknown"); 00061 remove = new Stats("remove"); 00062 create = new Stats("create"); 00063 drop = new Stats("drop"); 00064 }
|
|
Increments the create count. Definition at line 186 of file CacheStatistics.java. 00187 { 00188 create.incrementCount(); 00189 }
|
|
Increments the delete count. Definition at line 194 of file CacheStatistics.java. 00195 {
00196 delete.incrementCount();
00197 }
|
|
Increments the drop count. Definition at line 202 of file CacheStatistics.java. 00203 { 00204 drop.incrementCount(); 00205 }
|
|
Increments the hits count. Definition at line 210 of file CacheStatistics.java. 00211 { 00212 hits.incrementCount(); 00213 }
|
|
Increments the insert count. Definition at line 218 of file CacheStatistics.java. 00219 { 00220 insert.incrementCount(); 00221 }
|
|
Increments the remove count. Definition at line 226 of file CacheStatistics.java. 00227 { 00228 remove.incrementCount(); 00229 }
|
|
Increments the select count. Definition at line 234 of file CacheStatistics.java. 00235 { 00236 select.incrementCount(); 00237 }
|
|
Increments the uncacheable count. Definition at line 258 of file CacheStatistics.java. 00259 { 00260 uncacheable.incrementCount(); 00261 }
|
|
Increments the unkwnown count. Definition at line 242 of file CacheStatistics.java. 00243 { 00244 unknown.incrementCount(); 00245 }
|
|
Increments the update count. Definition at line 250 of file CacheStatistics.java. 00251 { 00252 update.incrementCount(); 00253 }
|
|
Get percentage of hits
Definition at line 291 of file CacheStatistics.java. 00292 { 00293 if (select.getCount() == 0) 00294 return 0; 00295 else 00296 return (long) ((float) hits.getCount() / (float) select.getCount() * 100.0); 00297 }
|
|
Retrieve cache statistics as a table
Definition at line 269 of file CacheStatistics.java. 00270 { 00271 String[] stats = new String[11]; 00272 stats[0] = "" + getSelect(); 00273 stats[1] = "" + getHits(); 00274 stats[2] = "" + getInsert(); 00275 stats[3] = "" + getUpdate(); 00276 stats[4] = "" + getUncacheable(); 00277 stats[5] = "" + getDelete(); 00278 stats[6] = "" + getUnknown(); 00279 stats[7] = "" + getRemove(); 00280 stats[8] = "" + getCreate(); 00281 stats[9] = "" + getDrop(); 00282 stats[10] = "" + getCacheHitRatio(); 00283 return stats; 00284 }
|
|
Returns the create.
Definition at line 88 of file CacheStatistics.java. 00089 {
00090 return create.getCount();
00091 }
|
|
Returns the delete.
Definition at line 98 of file CacheStatistics.java. 00099 { 00100 return delete.getCount(); 00101 }
|
|
Returns the drop.
Definition at line 108 of file CacheStatistics.java. 00109 {
00110 return drop.getCount();
00111 }
|
|
Returns the hits.
Definition at line 118 of file CacheStatistics.java. 00119 {
00120 return hits.getCount();
00121 }
|
|
Returns the insert.
Definition at line 128 of file CacheStatistics.java. 00129 {
00130 return insert.getCount();
00131 }
|
|
Returns the remove.
Definition at line 138 of file CacheStatistics.java. 00139 {
00140 return remove.getCount();
00141 }
|
|
Returns the select.
Definition at line 148 of file CacheStatistics.java. 00149 {
00150 return select.getCount();
00151 }
|
|
Returns the uncacheable.
Definition at line 178 of file CacheStatistics.java. 00179 {
00180 return uncacheable.getCount();
00181 }
|
|
Returns the unknown.
Definition at line 158 of file CacheStatistics.java. 00159 {
00160 return unknown.getCount();
00161 }
|
|
Returns the update.
Definition at line 168 of file CacheStatistics.java. 00169 {
00170 return update.getCount();
00171 }
|
|
Resets all stats to zero. Definition at line 69 of file CacheStatistics.java. 00070 {
00071 select.reset();
00072 hits.reset();
00073 insert.reset();
00074 update.reset();
00075 uncacheable.reset();
00076 delete.reset();
00077 unknown.reset();
00078 remove.reset();
00079 create.reset();
00080 drop.reset();
00081 }
|