---
title: "Curator同时读取节点状态和值的办法"
author: "douknow"
date: "2017-02-24T19:54:51Z"
tags: []
categories: ["编程语言"]
slug: "curator"
draft: false
lastmod: "2017-02-24T19:54:51Z"
id: 2358999
url: "https://douknow.iteye.com/blog/2358999"
---

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

写道

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

public CuratorFramework getClient()