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)
| 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); |
no outgoing calls
no test coverage detected