private Optional<Map.Entry<Long, LogSegment>> floorEntry(long offset) {
        return Optional.ofNullable(segments.floorEntry(offset));
    }
Return the entry associated with the greatest offset less than or equal to the given offset,
if it exists.

This method is thread-safe.
storage/src/main/java/org/apache/kafka/storage/internals/log/LogSegments.java