Curator同时读取节点状态和值的办法

很简单, 用storingStatIn, 但google不太好找, 还是看源码慢慢琢磨出来的

写道
Stat stat = new Stat();
String node="/root/valueNode";
byte[] bytes = getClient().getData().storingStatIn(stat).forPath(node);

public CuratorFramework getClient()

猜你喜欢

转载自douknow.iteye.com/blog/2358999