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

Method segmentFor

output/java_guava/1.4.13/LocalCache.java:1944–1947  ·  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

1942 */
1943
1944 Segment<K, V> segmentFor(int hash) {
1945 // TODO(fry): Lazily create segments?
1946 return segments[(hash >>> segmentShift) & segmentMask];
1947 }
1948
1949 Segment<K, V> createSegment(int initialCapacity, long maxSegmentWeight, StatsCounter statsCounter) {
1950 return new Segment<K, V>(this, initialCapacity, maxSegmentWeight, statsCounter);

Callers 15

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

Calls

no outgoing calls

Tested by

no test coverage detected