public void reset() {
        setWrotePosition(0);
        setFlushPosition(0);
        this.header.setFirstLogIndex(FileHeader.BLANK_OFFSET_INDEX);
        flush();
    }
Returns true when the segment file contains the log index.

@param logIndex the log index
@return true if the segment file contains the log index, otherwise return false
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/file/AbstractFile.java