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

Method segmentFor

output/java_guava/1.4.19/LocalCache.java:1949–1952  ·  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

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