mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +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:
@@ -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