zookeeper

xiaoxiao2021-02-28  47

zkClient.createEphemeral(“/path/xxx”) 临时 zkClient.createPersistent(“/path/xxx”) 持久到硬盘

zkClient.subscribeDataChanges(“/db”, new IZkDataListener() { public void handleDataChange(String dataPath, byte[] data) throws Exception { System.out.println(new String(data)); }

public void handleDataDeleted(String dataPath) throws Exception { System.out.println(dataPath); }

});

转载请注明原文地址: https://www.6miu.com/read-2629349.html

最新回复(0)