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