@Override
    public boolean checkExpiredSegments(long checkTimestamp, long fileValidTimeMs) {
        boolean hasExpired = false;
        for (Segment segment : segmentList.get()) {
            if (segment == null) {
                continue;
            }
            if (segment.checkAndSetExpired(checkTimestamp, fileValidTimeMs) == 0) {
                break;
            }
            hasExpired = true;
        }
        return hasExpired;
    }
Check each FileSegment whether is expired, and set expire status.

@param checkTimestamp   current check timestamp
@param fileValidTimeMs  the max expire interval
@return                 whether is expired
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java