code: public synchronized Segment firstSegment() {
      assertOpen();
      Map.Entry<Long, Segment> segment = segments.firstEntry();
      return segment != null ? segment.getValue() : null;
    }
docs: Returns the first segment in the log.
  
  @throws IllegalStateException if the segment manager is not open