Segment<K, V> segmentFor(final int hash) {
    if (segmentMask == 0) {
      return segments[0];
    }
    return segments[(hash >>> segmentShift) & segmentMask];
  }
Returns the segment that should be used for key with given hash

@param hash the hash code for the key
@return the segment
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap.java