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

Method segmentFor

output/java_guava/1.4.17/LocalCache.java:1948–1951  ·  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

1946 */
1947
1948 Segment<K, V> segmentFor(int hash) {
1949 // TODO(fry): Lazily create segments?
1950 return segments[(hash >>> segmentShift) & segmentMask];
1951 }
1952
1953 Segment<K, V> createSegment(int initialCapacity, long maxSegmentWeight, StatsCounter statsCounter) {
1954 return new Segment<K, V>(this, initialCapacity, maxSegmentWeight, 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