@Override
  public int compareTo(LogSegmentName o) {
    // special case for log_current (one segment logs)
    if (isSingleSegment() && o.isSingleSegment()) {
      return 0;
    } else if (isSingleSegment() || o.isSingleSegment()) {
      throw new IllegalArgumentException("Cannot compare single file log name against segmented log name");
    }
    int compare = Long.compare(position, o.position);
    if (compare == 0) {
      compare = Long.compare(generation, o.generation);
    }
    return compare;
  }
@return the name of the file that backs the log segment.
ambry-store/src/main/java/com/github/ambry/store/LogSegmentName.java