Returns a new CacheStats representing the difference between this CacheStats and other. Negative values, which aren't supported by CacheStats will be rounded up to zero.
(CacheStats other)
| 246 | |
| 247 | |
| 248 | public CacheStats minus(CacheStats other) { |
| 249 | return new CacheStats(Math.max(0, hitCount - other.hitCount), Math.max(0, missCount - other.missCount), Math.max(0, loadSuccessCount - other.loadSuccessCount), Math.max(0, loadExceptionCount - other.loadExceptionCount), Math.max(0, totalLoadTime - other.totalLoadTime), Math.max(0, evictionCount - other.evictionCount)); |
| 250 | } |
| 251 | |
| 252 | /** |
| 253 | * Returns a new {@code CacheStats} representing the sum of this {@code CacheStats} and |