nacos 自動重新整理配置

郑某人1發表於2024-09-03
com.alibaba.nacos.client.config.impl.ClientWorker

private final BlockingQueue<Object> listenExecutebell = new ArrayBlockingQueue<>(1);

  @Override
        public void startInternal() {
            executor.schedule(() -> {
                while (!executor.isShutdown() && !executor.isTerminated()) {
                    try {
              // listenExecutebell中一直不會沒有資料,暫停5秒 listenExecutebell.poll(
5L, TimeUnit.SECONDS); if (executor.isShutdown() || executor.isTerminated()) { continue; } executeConfigListen(); } catch (Throwable e) { LOGGER.error("[ rpc listen execute ] [rpc listen] exception", e); } } }, 0L, TimeUnit.MILLISECONDS); }


相關文章