From a10dca9f58afb9a6d5c1af02909c781a6a2348db Mon Sep 17 00:00:00 2001 From: xiaorenping <85027396@qq.com> Date: Sat, 30 Mar 2024 22:35:59 +0800 Subject: [PATCH] feat[net]: get zookeeper path --- .../main/java/com/zfoo/net/consumer/registry/IRegistry.java | 1 + .../com/zfoo/net/consumer/registry/ZookeeperRegistry.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/net/src/main/java/com/zfoo/net/consumer/registry/IRegistry.java b/net/src/main/java/com/zfoo/net/consumer/registry/IRegistry.java index a8f06221..8c05472f 100644 --- a/net/src/main/java/com/zfoo/net/consumer/registry/IRegistry.java +++ b/net/src/main/java/com/zfoo/net/consumer/registry/IRegistry.java @@ -55,4 +55,5 @@ public interface IRegistry { void shutdown(); + String getRootPath(); } diff --git a/net/src/main/java/com/zfoo/net/consumer/registry/ZookeeperRegistry.java b/net/src/main/java/com/zfoo/net/consumer/registry/ZookeeperRegistry.java index ca199400..01c63e18 100644 --- a/net/src/main/java/com/zfoo/net/consumer/registry/ZookeeperRegistry.java +++ b/net/src/main/java/com/zfoo/net/consumer/registry/ZookeeperRegistry.java @@ -755,4 +755,8 @@ public class ZookeeperRegistry implements IRegistry { return StringUtils.format("[path:{}] [stat:{}] [dataSize:{}]", childData.getPath(), childData.getStat(), childData.getData().length); } + @Override + public String getRootPath() { + return rootPath; + } }