MCPcopy Create free account
hub / github.com/antlr/codebuff / CacheStats

Method CacheStats

output/java_guava/1.4.13/CacheStats.java:73–86  ·  view source on GitHub ↗

Constructs a new CacheStats instance. Five parameters of the same type in a row is a bad thing, but this class is not constructed by end users and is too fine-grained for a builder.

(long hitCount, long missCount, long loadSuccessCount, long loadExceptionCount, long totalLoadTime, long evictionCount)

Source from the content-addressed store, hash-verified

71
72
73 public CacheStats(long hitCount, long missCount, long loadSuccessCount, long loadExceptionCount, long totalLoadTime, long evictionCount) {
74 checkArgument(hitCount >= 0);
75 checkArgument(missCount >= 0);
76 checkArgument(loadSuccessCount >= 0);
77 checkArgument(loadExceptionCount >= 0);
78 checkArgument(totalLoadTime >= 0);
79 checkArgument(evictionCount >= 0);
80 this.hitCount = hitCount;
81 this.missCount = missCount;
82 this.loadSuccessCount = loadSuccessCount;
83 this.loadExceptionCount = loadExceptionCount;
84 this.totalLoadTime = totalLoadTime;
85 this.evictionCount = evictionCount;
86 }
87
88 /**
89 * Returns the number of times {@link Cache} lookup methods have returned either a cached or

Callers

nothing calls this directly

Calls 1

checkArgumentMethod · 0.45

Tested by

no test coverage detected