public boolean checkValid() { if (zkClientx != null) { return mutex.state(); } else { return true; // 默认都放过 } }
private void waitClientRunning() { try { if (zkClientx != null) { mutex.get(); // 阻塞等待 } } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new CanalClientException(e); } }