MCPcopy
hub / github.com/google/guava / segmentFor

Method segmentFor

guava/src/com/google/common/cache/LocalCache.java:1759–1762  ·  guava/src/com/google/common/cache/LocalCache.java::LocalCache.segmentFor

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

1757 * @return the segment
1758 */
1759 Segment<K, V> segmentFor(int hash) {
1760 class="cm">// TODO(fry): Lazily create segments?
1761 return segments[(hash >>> segmentShift) & segmentMask];
1762 }
1763
1764 Segment<K, V> createSegment(
1765 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 1

forceExpandSegmentMethod · 0.36