/** * Create an ephemeral and sequential path * @param path path * @param obj object * @return the path created * @throws Exception */ public String createEphemeralSequential(String path, Object obj) { return createEphemeralSequential(path, JSON.toJSONString(obj)); }
/** * Create an ephemeral path * @param path path * @param data string data * @return the path created * @throws Exception */ public String createEphemeralSequential(String path, String data) { try { return createEphemeralSequential(path, data.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { handleConnectionLoss(e); throw new ZkException(e); } }