mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1685 DefaultServerCache expose hit and miss count to assist testing
Expose these counters to assist the testing of duel caches where DefaultServerCache is used as the near cache.
This commit is contained in:
1 parent
e700f1c83c
commit
a5e3a70921
2 files changed
+21
No files matched your search
@@ -119,6 +119,20 @@ public class DefaultServerCache implements ServerCache {
|
||||
return cacheStats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the count of get hits.
|
||||
*/
|
||||
public long getHitCount() {
|
||||
return hitCount.get(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the count of get misses.
|
||||
*/
|
||||
public long getMissCount() {
|
||||
return missCount.get(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHitRatio() {
|
||||
|
||||
|
||||
Reference in new issue
Block a user