public void swapOut() {
        if (!this.swappedOut) {
            this.writeLock.lock();
            try {
                if (this.swappedOut) {
                    return;
                }
                if (!this.readOnly) {
                    LOG.warn("The segment file {} is not readonly, can't be swapped out.", this.path);
                    return;
                }
                final long now = Utils.monotonicMs();
                if (this.swappedOutTimestamp > 0 && now - this.swappedOutTimestamp < ONE_MINUTE) {
                    return;
                }
                this.swappedOut = true;
                Utils.unmap(this.buffer);
                this.buffer = null;
                this.swappedOutTimestamp = now;
                LOG.info("Swapped out segment file {} cost {} ms.", this.path, Utils.monotonicMs() - now);
            } finally {
                this.writeLock.unlock();
            }
        }
    }
return true when this segment file is blank that we don't write any data into it.
@return
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java