BlobReadOptions getBlobReadInfo(StoreKey id, EnumSet<StoreGetOptions> getOptions) throws StoreException {
    rwLock.readLock().lock();
    try {
      ConcurrentSkipListMap<Offset, IndexSegment> indexSegments = validIndexSegments;
      IndexValue value = findKey(id);
      BlobReadOptions readOptions;
      if (value == null) {
        throw new StoreException("Id " + id + " not present in index " + dataDir, StoreErrorCodes.IDNotFound);
      } else if (value.isDelete()) {
        if (!getOptions.contains(StoreGetOptions.Store_Include_Deleted)) {
          throw new StoreException("Id " + id + " has been deleted in index " + dataDir, StoreErrorCodes.IDDeleted);
        } else {
          if (value.getOperationTimeInMs() + TimeUnit.MINUTES.toMillis(config.storeDeletedMessageRetentionMinutes)
              < time.milliseconds()) {
            // fetching a blob that was deleted more than the retention minutes.
            metrics.getOutOfRetentionDeletedBlobCount.inc();
          }
          readOptions = getDeletedBlobReadOptions(value, id, indexSegments);
        }
      } else if (isExpired(value) && !getOptions.contains(StoreGetOptions.Store_Include_Expired)) {
        throw new StoreException("Id " + id + " has expired ttl in index " + dataDir, StoreErrorCodes.TTLExpired);
      } else if (value.isUndelete()) {
        readOptions = getUndeletedBlobReadOptions(value, id, indexSegments);
      } else {
        // This is only for test
        if (getBlobReadInfoTestCallback != null) {
          getBlobReadInfoTestCallback.run();
        }
        readOptions = fromIndexValue(id, value);
      }
      return readOptions;
    } finally {
      rwLock.readLock().unlock();
    }
  }
Returns the blob read info for a given key
@param id The id of the entry whose info is required
@param getOptions the get options that indicate whether blob read info for deleted/expired blobs are to be returned.
@return The blob read info that contains the information for the given key
@throws StoreException
ambry-store/src/main/java/com/github/ambry/store/PersistentIndex.java