@Override
    public void close() {
        try {
            watcherInstanceRegisterMap.clear();
            //close treeCache
            cacheMap.values().forEach(CuratorCache::close);
            this.client.close();
            this.client = null;
            LOGGER.info("zookeeper registry shutting down...");
        } catch (Exception e) {
            LOGGER.error("zookeeper registry shutting down error", e);
            throw new ShenyuException(e);
        }
    }
The type Zookeeper instance register repository.
shenyu-registry/shenyu-registry-zookeeper/src/main/java/org/apache/shenyu/registry/zookeeper/ZookeeperInstanceRegisterRepository.java