docs: private void compactByAge() {
      if (maxLogAge != null) {
        long currentTime = System.currentTimeMillis();
        JournalSegment<LogEntry> compactSegment = null;
        Long compactIndex = null;
        for (JournalSegment<LogEntry> segment : journal.segments()) {
          if (currentTime - segment.descriptor().updated() > maxLogAge.toMillis()) {
            log.debug("Found expired journal segment {}", segment.file().file());
            compactSegment = segment;
          } else if (compactSegment != null) {
            compactIndex = segment.index();
            break;
          }
        }
  
        if (compactIndex != null) {
          log.info("Compacting journal by age up to {}", compactIndex);
          journal.compact(compactIndex);
        }
      }
    }