protected static void createNode(CuratorFramework curator, String path, byte[] data, List<ACL> acls, CreateMode mode) throws Exception { ProtectACLCreateModePathAndBytesable<String> builder = curator.create().creatingParentsIfNeeded(); LOG.debug("Creating node [path = {}], [data = {}], [acls = {}], [mode = {}]", path, asString(data), acls, mode); if (acls == null) { if (mode == null) { TransactionalState.forPath(builder, path, data); } else { TransactionalState.forPath(builder.withMode(mode), path, data); } return; } TransactionalState.forPath(builder.withACL(acls), path, data); }
protected static void createNode(CuratorFramework curator, String path, byte[] data, List<ACL> acls, CreateMode mode) throws Exception { ProtectACLCreateModePathAndBytesable<String> builder = curator.create().creatingParentsIfNeeded(); LOG.debug("Creating node [path = {}], [data = {}], [acls = {}], [mode = {}]", path, asString(data), acls, mode); if (acls == null) { if (mode == null ) { TransactionalState.forPath(builder, path, data); } else { TransactionalState.forPath(builder.withMode(mode), path, data); } return; } TransactionalState.forPath(builder.withACL(acls), path, data); }
protected static void createNode(CuratorFramework curator, String path, byte[] data, List<ACL> acls, CreateMode mode) throws Exception { ProtectACLCreateModePathAndBytesable<String> builder = curator.create().creatingParentsIfNeeded(); if (acls == null) { if (mode == null ) { TransactionalState.forPath(builder, path, data); } else { TransactionalState.forPath(builder.withMode(mode), path, data); } return; } TransactionalState.forPath(builder.withACL(acls), path, data); }