摘要:
1.NodeCache监听代码: @Test public void testNodeCache() throws Exception { //1.创建NodeCache对象 NodeCache nodeCache = new NodeCache(client,"/app1"); //2.注册监听 阅读全文
posted @ 2023-08-04 17:43
会秃头的小白
阅读(66)
评论(0)
推荐(0)
摘要:
/* * 删除节点 * 1.删除单个节点 * 2.删除带有子节点的节点 * 3.必须成功的删除 * 4.回调 * * */ @Test public void delete1() throws Exception{ // 1.删除单个节点 client.delete().forPath("/app1 阅读全文
posted @ 2023-08-04 17:04
会秃头的小白
阅读(316)
评论(0)
推荐(0)
摘要:
*修改数据 * 1.修改数据 * 2.根据版本修改 * * * */ @Test public void testSet() throws Exception{ Stat stat = new Stat(); client.getData().storingStatIn(stat).forPath( 阅读全文
posted @ 2023-08-04 16:57
会秃头的小白
阅读(25)
评论(0)
推荐(0)
摘要:
/** * 1.查询数据 :get * 2.查询子节点 : ls * 3.查询节点的状态信息 :ls -s * * */ @Test public void testGet1() throws Exception{ //1.查询数据 :get byte[] data = client.getData 阅读全文
posted @ 2023-08-04 16:52
会秃头的小白
阅读(52)
评论(0)
推荐(0)
摘要:
import org.apache.curator.RetryPolicy; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFacto 阅读全文
posted @ 2023-08-04 16:44
会秃头的小白
阅读(62)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2023-08-04 16:44
会秃头的小白
阅读(23)
评论(0)
推荐(0)

浙公网安备 33010602011771号