@Override
    public long getMaxOffset() {
        final Segment[] curViews = segmentList.get();
        if (curViews.length == 0) {
            return 0L;
        }
        Segment last = curViews[curViews.length - 1];
        if (last == null) {
            return 0L;
        }
        return last.getLast();
    }
Return the max position of these FileSegments.

@return   the latest position
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java