/** * Create an persistent path * @param path path * @param obj a object * @return the path created */ public String createSequentialJson(String path, Object obj) { try { return createSequential(path, JSON.toJSONString(obj).getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { handleConnectionLoss(e); throw new ZkException(e); } }
/** * Create an persistent path * @param path path * @param data byte data * @return the path created */ public String createSequential(String path, String data) { try { return createSequential(path, data.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { handleConnectionLoss(e); throw new ZkException(e); } }