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

Method segmentFor

corpus/java/training/guava/cache/LocalCache.java:1878–1881  ·  view source on GitHub ↗

Returns the segment that should be used for a key with the given hash. @param hash the hash code for the key @return the segment

(int hash)

Source from the content-addressed store, hash-verified

1876 * @return the segment
1877 */
1878 Segment<K, V> segmentFor(int hash) {
1879 // TODO(fry): Lazily create segments?
1880 return segments[(hash >>> segmentShift) & segmentMask];
1881 }
1882
1883 Segment<K, V> createSegment(
1884 int initialCapacity, long maxSegmentWeight, StatsCounter statsCounter) {

Callers 15

newEntryMethod · 0.95
copyEntryMethod · 0.95
newValueReferenceMethod · 0.95
reclaimValueMethod · 0.95
reclaimKeyMethod · 0.95
isLiveMethod · 0.95
getMethod · 0.95
getIfPresentMethod · 0.95
getEntryMethod · 0.95
refreshMethod · 0.95
containsKeyMethod · 0.95
putMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected