类 AbstractEtcdClient<WatcherListener>

    • 构造器详细资料

      • AbstractEtcdClient

        public AbstractEtcdClient​(URL url)
    • 方法详细资料

      • create

        public void create​(String path)
        从接口复制的说明: EtcdClient
        save the specified path to the etcd registry.
        指定者:
        create 在接口中 EtcdClient
        参数:
        path - the path to be saved
      • createEphemeral

        public long createEphemeral​(String path)
        从接口复制的说明: EtcdClient
        save the specified path to the etcd registry. if node disconnect from etcd, it will be deleted automatically by etcd when session timeout.
        指定者:
        createEphemeral 在接口中 EtcdClient
        参数:
        path - the path to be saved
        返回:
        the lease of current path.
      • addStateListener

        public void addStateListener​(StateListener listener)
        从接口复制的说明: EtcdClient
        support connection notify if connection state was changed.
        指定者:
        addStateListener 在接口中 EtcdClient
        参数:
        listener - if state changed, listener will be triggered.
      • removeStateListener

        public void removeStateListener​(StateListener listener)
        从接口复制的说明: EtcdClient
        remove connection notify if connection state was changed.
        指定者:
        removeStateListener 在接口中 EtcdClient
        参数:
        listener - remove already registered listener, if listener not exists nothing happened.
      • addChildListener

        public List<String> addChildListener​(String path,
                                             ChildListener listener)
        从接口复制的说明: EtcdClient
        register children listener for specified path.
        指定者:
        addChildListener 在接口中 EtcdClient
        参数:
        path - the path to be watched when children is added, delete or update.
        listener - when children is changed , listener will be triggered.
        返回:
        direct children directory, contains zero element list if children directory not exists.
      • getChildListener

        public WatcherListener getChildListener​(String path,
                                                ChildListener listener)
        从接口复制的说明: EtcdClient
        find watcher of the children listener for specified path.
        指定者:
        getChildListener 在接口中 EtcdClient
        参数:
        path - the path to be watched when children is added, delete or update.
        listener - when children is changed , listener will be triggered.
        返回:
        watcher if find else null
      • removeChildListener

        public void removeChildListener​(String path,
                                        ChildListener listener)
        从接口复制的说明: EtcdClient
        unregister children lister for specified path.
        指定者:
        removeChildListener 在接口中 EtcdClient
        参数:
        path - the path to be unwatched .
        listener - when children is changed , lister will be triggered.
      • close

        public void close()
        从接口复制的说明: EtcdClient
        close current client and release all resourses.
        指定者:
        close 在接口中 EtcdClient
      • doClose

        public abstract void doClose()
      • doCreatePersistent

        public abstract void doCreatePersistent​(String path)
      • doCreateEphemeral

        public abstract long doCreateEphemeral​(String path)
      • delete

        public abstract void delete​(String path)
        从接口复制的说明: EtcdClient
        remove the specified from etcd registry.
        指定者:
        delete 在接口中 EtcdClient
        参数:
        path - the path to be removed
      • checkExists

        public abstract boolean checkExists​(String path)
      • removeChildWatcherListener

        public abstract void removeChildWatcherListener​(String path,
                                                        WatcherListener listener)