public synchronized void reconnectAfterExpiration() throws IOException, InterruptedException {

        if (zk != null) {
            States state = zk.getState();
            if (state != null && state.isConnected() && state.isAlive()) {
                return;
            }

            logger.info("[ZK_SESSION_EXPIRATION] Closing dead ZooKeeper connection, session" + " was: 0x"
                    + Long.toHexString(zk.getSessionId()));
            zk.close();
        }

        this.zk = new ZooKeeper(this.quorumServers, this.sessionTimeout, this.watcher);
        logger.info("[ZK_SESSION_EXPIRATION] Recreated a ZooKeeper, session" + " is: 0x"
                + Long.toHexString(zk.getSessionId()));
    }
Filters the given node list by the given prefixes. This method is all-inclusive--if any
element in the node list starts with any of the given prefixes, then it is included in the
result.

@param nodes    the nodes to filter
@param prefixes the prefixes to include in the result
@return list of every element that starts with one of the prefixes
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/zookeeper/RecoverableZooKeeper.java