int getNumberOfItems() {
    rwLock.readLock().lock();
    try {
      if (sealed.get()) {
        throw new UnsupportedOperationException(
            "Operation supported only on index segments that are not sealed: " + getStartOffset());
      }
      return numberOfItems.get();
    } finally {
      rwLock.readLock().unlock();
    }
  }
The number of items contained in this segment
@return The number of items contained in this segment
ambry-store/src/main/java/com/github/ambry/store/IndexSegment.java