test_class.declarator: client
test_class.original_string: JEtcdClient client;
test_class.type: JEtcdClient
test_class.var_name: client
test_class.file: dubbo-remoting/dubbo-remoting-etcd3/src/test/java/org/apache/dubbo/remoting/etcd/jetcd/JEtcdClientTest.java
test_class.identifier: JEtcdClientTest
test_case.body: @Test
      public void test_watch_then_unwatch() throws InterruptedException {
  
          String path = "/dubbo/com.alibaba.dubbo.demo.DemoService/providers";
          String child = "/dubbo/com.alibaba.dubbo.demo.DemoService/providers/demoService2";
  
          final CountDownLatch notNotified = new CountDownLatch(1);
          final CountDownLatch notTwiceNotified = new CountDownLatch(2);
  
          final Holder notified = new Holder();
  
          ChildListener childListener = (parent, children) -> {
              Assertions.assertEquals(1, children.size());
              Assertions.assertEquals(child.substring(child.lastIndexOf("/") + 1), children.get(0));
              notNotified.countDown();
              notTwiceNotified.countDown();
              notified.getAndIncrease();
          };
  
          client.addChildListener(path, childListener);
  
          client.createEphemeral(child);
          Assertions.assertTrue(notNotified.await(15, TimeUnit.SECONDS));
  
          client.removeChildListener(path, childListener);
          client.delete(child);
  
          Assertions.assertFalse(notTwiceNotified.await(5, TimeUnit.SECONDS));
          Assertions.assertEquals(1, notified.value);
          client.delete(child);
      }
test_case.class_method_signature: JEtcdClientTest.test_watch_then_unwatch()
test_case.full_signature: @Test public void test_watch_then_unwatch()
test_case.identifier: test_watch_then_unwatch
test_case.invocations: assertEquals size assertEquals substring lastIndexOf get countDown countDown getAndIncrease addChildListener createEphemeral assertTrue await removeChildListener delete assertFalse await assertEquals delete
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_watch_then_unwatch()
focal_class.declarator: clientWrapper
focal_class.modifier: private
focal_class.original_string: private JEtcdClientWrapper clientWrapper;
focal_class.type: JEtcdClientWrapper
focal_class.var_name: clientWrapper
focal_class.declarator: reconnectSchedule
focal_class.modifier: private
focal_class.original_string: private ScheduledExecutorService reconnectSchedule;
focal_class.type: ScheduledExecutorService
focal_class.var_name: reconnectSchedule
focal_class.declarator: notifyExecutor
focal_class.modifier: private
focal_class.original_string: private ExecutorService notifyExecutor;
focal_class.type: ExecutorService
focal_class.var_name: notifyExecutor
focal_class.declarator: delayPeriod
focal_class.modifier: private
focal_class.original_string: private int delayPeriod;
focal_class.type: int
focal_class.var_name: delayPeriod
focal_class.declarator: logger = LoggerFactory.getLogger(JEtcdClient.class)
focal_class.modifier: private
focal_class.original_string: private Logger logger = LoggerFactory.getLogger(JEtcdClient.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: dubbo-remoting/dubbo-remoting-etcd3/src/main/java/org/apache/dubbo/remoting/etcd/jetcd/JEtcdClient.java
focal_class.identifier: JEtcdClient
focal_class.class_method_signature: JEtcdClient.JEtcdClient(URL url)
focal_class.full_signature: public  JEtcdClient(URL url)
focal_class.identifier: JEtcdClient
focal_class.modifiers: public
focal_class.parameters: (URL url)
focal_class.signature:  JEtcdClient(URL url)
focal_class.class_method_signature: JEtcdClient.doCreatePersistent(String path)
focal_class.full_signature: @Override public void doCreatePersistent(String path)
focal_class.identifier: doCreatePersistent
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: void
focal_class.signature: void doCreatePersistent(String path)
focal_class.class_method_signature: JEtcdClient.doCreateEphemeral(String path)
focal_class.full_signature: @Override public long doCreateEphemeral(String path)
focal_class.identifier: doCreateEphemeral
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: long
focal_class.signature: long doCreateEphemeral(String path)
focal_class.class_method_signature: JEtcdClient.checkExists(String path)
focal_class.full_signature: @Override public boolean checkExists(String path)
focal_class.identifier: checkExists
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean checkExists(String path)
focal_class.class_method_signature: JEtcdClient.createChildWatcherListener(String path, ChildListener listener)
focal_class.full_signature: @Override public EtcdWatcher createChildWatcherListener(String path, ChildListener listener)
focal_class.identifier: createChildWatcherListener
focal_class.modifiers: @Override public
focal_class.parameters: (String path, ChildListener listener)
focal_class.return: EtcdWatcher
focal_class.signature: EtcdWatcher createChildWatcherListener(String path, ChildListener listener)
focal_class.class_method_signature: JEtcdClient.addChildWatcherListener(String path, EtcdWatcher etcdWatcher)
focal_class.full_signature: @Override public List<String> addChildWatcherListener(String path, EtcdWatcher etcdWatcher)
focal_class.identifier: addChildWatcherListener
focal_class.modifiers: @Override public
focal_class.parameters: (String path, EtcdWatcher etcdWatcher)
focal_class.return: List<String>
focal_class.signature: List<String> addChildWatcherListener(String path, EtcdWatcher etcdWatcher)
focal_class.class_method_signature: JEtcdClient.removeChildWatcherListener(String path, EtcdWatcher etcdWatcher)
focal_class.full_signature: @Override public void removeChildWatcherListener(String path, EtcdWatcher etcdWatcher)
focal_class.identifier: removeChildWatcherListener
focal_class.modifiers: @Override public
focal_class.parameters: (String path, EtcdWatcher etcdWatcher)
focal_class.return: void
focal_class.signature: void removeChildWatcherListener(String path, EtcdWatcher etcdWatcher)
focal_class.class_method_signature: JEtcdClient.getChildren(String path)
focal_class.full_signature: @Override public List<String> getChildren(String path)
focal_class.identifier: getChildren
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: List<String>
focal_class.signature: List<String> getChildren(String path)
focal_class.class_method_signature: JEtcdClient.isConnected()
focal_class.full_signature: @Override public boolean isConnected()
focal_class.identifier: isConnected
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isConnected()
focal_class.class_method_signature: JEtcdClient.createLease(long second)
focal_class.full_signature: @Override public long createLease(long second)
focal_class.identifier: createLease
focal_class.modifiers: @Override public
focal_class.parameters: (long second)
focal_class.return: long
focal_class.signature: long createLease(long second)
focal_class.class_method_signature: JEtcdClient.createLease(long ttl, long timeout, TimeUnit unit)
focal_class.full_signature: @Override public long createLease(long ttl, long timeout, TimeUnit unit)
focal_class.identifier: createLease
focal_class.modifiers: @Override public
focal_class.parameters: (long ttl, long timeout, TimeUnit unit)
focal_class.return: long
focal_class.signature: long createLease(long ttl, long timeout, TimeUnit unit)
focal_class.class_method_signature: JEtcdClient.delete(String path)
focal_class.full_signature: @Override public void delete(String path)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: void
focal_class.signature: void delete(String path)
focal_class.class_method_signature: JEtcdClient.revokeLease(long lease)
focal_class.full_signature: @Override public void revokeLease(long lease)
focal_class.identifier: revokeLease
focal_class.modifiers: @Override public
focal_class.parameters: (long lease)
focal_class.return: void
focal_class.signature: void revokeLease(long lease)
focal_class.class_method_signature: JEtcdClient.doClose()
focal_class.full_signature: @Override public void doClose()
focal_class.identifier: doClose
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void doClose()
focal_class.class_method_signature: JEtcdClient.getKVValue(String key)
focal_class.full_signature: @Override public String getKVValue(String key)
focal_class.identifier: getKVValue
focal_class.modifiers: @Override public
focal_class.parameters: (String key)
focal_class.return: String
focal_class.signature: String getKVValue(String key)
focal_class.class_method_signature: JEtcdClient.put(String key, String value)
focal_class.full_signature: @Override public boolean put(String key, String value)
focal_class.identifier: put
focal_class.modifiers: @Override public
focal_class.parameters: (String key, String value)
focal_class.return: boolean
focal_class.signature: boolean put(String key, String value)
focal_class.class_method_signature: JEtcdClient.putEphemeral(String key, String value)
focal_class.full_signature: @Override public boolean putEphemeral(String key, String value)
focal_class.identifier: putEphemeral
focal_class.modifiers: @Override public
focal_class.parameters: (String key, String value)
focal_class.return: boolean
focal_class.signature: boolean putEphemeral(String key, String value)
focal_class.class_method_signature: JEtcdClient.getChannel()
focal_class.full_signature: public ManagedChannel getChannel()
focal_class.identifier: getChannel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ManagedChannel
focal_class.signature: ManagedChannel getChannel()
focal_class.superclass: extends AbstractEtcdClient<JEtcdClient.EtcdWatcher>
focal_method.body: @Override
      public void delete(String path) {
          clientWrapper.delete(path);
      }
focal_method.class_method_signature: JEtcdClient.delete(String path)
focal_method.full_signature: @Override public void delete(String path)
focal_method.identifier: delete
focal_method.invocations: delete
focal_method.modifiers: @Override public
focal_method.parameters: (String path)
focal_method.return: void
focal_method.signature: void delete(String path)