V put(final K key, final int hash, final V value, final boolean onlyIfAbsent) {
      final ReentrantReadWriteLock.WriteLock writeLock = super.writeLock();
      writeLock.lock();
      try {
        int c = count;
        if (c++ > threshold) {
          rehash();
        }
        final HashEntry<K, V>[] tab = table;
        final int index = hash & (tab.length - 1);
        final HashEntry<K, V> first = tab[index];
        HashEntry<K, V> e = first;
        while (e != null && (e.getEntryHash() != hash || !equalityKeyCompare(key, e))) {
          e = e.getNextEntry();
        }

        final V oldValue;
        if (e != null) {
          oldValue = e.getMapValue();
          if (!onlyIfAbsent) {
            e.setMapValue(value);
          }
        } else {
          oldValue = null;
          ++modCount;
          tab[index] = entryCreator.newEntry(key, hash, first, value);
          count = c; // write-volatile
        }
        return oldValue;
      } finally {
        writeLock.unlock();
      }
    }
Added for GemFire since it stores some keys inline.
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/CustomEntryConcurrentHashMap.java