private Offset getCurrentEndOffset(ConcurrentSkipListMap<Offset, IndexSegment> indexSegments) {
    // If no indexSegments exist, return start offset of first log segment
    return indexSegments.size() == 0 ? getStartOffset(indexSegments)
        : indexSegments.lastEntry().getValue().getEndOffset();
  }
Gets the end {@link Offset} of the given instance of {@code indexSegments}.
@param indexSegments the map of index segment start {@link Offset} to {@link IndexSegment} instances
ambry-store/src/main/java/com/github/ambry/store/PersistentIndex.java