@Override
    public void run() {
        int printCnt;
        long startTime;
        LOGGER.info("{} is started", this.threadName);
        // process daemon task
        while (!shutdown.get()) {
            try {
                Thread.sleep(intervalMs);
                writeIndex.incrementAndGet();
                startTime = System.currentTimeMillis();
                printCnt = loopProcess(startTime);
                checkAndPrintStatus(printCnt, System.currentTimeMillis() - startTime);
            } catch (InterruptedException e) {
                LOGGER.info("{} has been interrupted", this.threadName);
                break;
            } catch (Throwable t) {
                LOGGER.info("{} throw a exception", this.threadName);
            }
        }
        // process exit output
        startTime = System.currentTimeMillis();
        printCnt = exitProcess(startTime);
        checkAndPrintStatus(printCnt, System.currentTimeMillis() - startTime);
        LOGGER.info("{} is stopped", this.threadName);
    }
Gets the read index

@return the read block index
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/metrics/stats/AbsStatsDaemon.java