new RegistrySecurity.AclListInfo(acls); if (LOG.isDebugEnabled()) { LOG.debug("Creating path {} with mode {} and ACL {}",
new RegistrySecurity.AclListInfo(acls); if (LOG.isDebugEnabled()) { LOG.debug("Creating path {} with mode {} and ACL {}",
/** * Create a path with given data. byte[0] is used for a path * without data * @param path path of operation * @param data initial data * @param acls * @throws IOException */ public void zkCreate(String path, CreateMode mode, byte[] data, List<ACL> acls) throws IOException { Preconditions.checkArgument(data != null, "null data"); checkServiceLive(); String fullpath = createFullPath(path); try { if (LOG.isDebugEnabled()) { LOG.debug("Creating {} with {} bytes of data and ACL {}", fullpath, data.length, new RegistrySecurity.AclListInfo(acls)); } curator.create().withMode(mode).withACL(acls).forPath(fullpath, data); } catch (Exception e) { throw operationFailure(fullpath, "create()", e, acls); } }
/** * Create a path with given data. byte[0] is used for a path * without data. * * @param path path of operation * @param data initial data * @param acls * @throws IOException */ public void zkCreate(String path, CreateMode mode, byte[] data, List<ACL> acls) throws IOException { Preconditions.checkArgument(data != null, "null data"); checkServiceLive(); String fullpath = createFullPath(path); try { if (LOG.isDebugEnabled()) { LOG.debug("Creating {} with {} bytes of data and ACL {}", fullpath, data.length, new RegistrySecurity.AclListInfo(acls)); } curator.create().withMode(mode).withACL(acls).forPath(fullpath, data); } catch (Exception e) { throw operationFailure(fullpath, "create()", e, acls); } }