NavigableSet<IndexValue> find(StoreKey keyToFind) throws StoreException {
    NavigableSet<IndexValue> toReturn = null;
    NavigableMap<StoreKey, ConcurrentSkipListSet<IndexValue>> indexCopy = index;
    rwLock.readLock().lock();
    try {
      if (!sealed.get()) {
        ConcurrentSkipListSet<IndexValue> values = indexCopy.get(keyToFind);
        if (values != null) {
          metrics.blobFoundInMemSegmentCount.inc();
          toReturn = values.clone();
        }
      } else {
        toReturn = sealedIndex.find(keyToFind);
      }
    } catch (StoreException e) {
      throw new StoreException(String.format("IndexSegment %s : %s", indexFile.getAbsolutePath(), e.getMessage()), e,
          e.getErrorCode());
    } finally {
      rwLock.readLock().unlock();
    }
    return toReturn != null ? Collections.unmodifiableNavigableSet(toReturn) : null;
  }
Finds an entry given a key. It finds from the in memory map or
does a binary search on the mapped persistent segment
@param keyToFind The key to find
@return The blob index value that represents the key or null if not found
@throws StoreException
ambry-store/src/main/java/com/github/ambry/store/IndexSegment.java