/** * Constructs a create operation. Arguments are as for the ZooKeeper method of the same name. * @see ZooKeeper#create(String, byte[], java.util.List, CreateMode) * @see CreateMode#fromFlag(int) * * @param path * the path for the node * @param data * the initial data for the node * @param acl * the acl for the node * @param flags * specifying whether the node to be created is ephemeral * and/or sequential but using the integer encoding. */ public static Op create(String path, byte[] data, List<ACL> acl, int flags) { return new Create(path, data, acl, flags); }
/** * Constructs a create operation. Arguments are as for the ZooKeeper method of the same name. * @see ZooKeeper#create(String, byte[], java.util.List, CreateMode) * * @param path * the path for the node * @param data * the initial data for the node * @param acl * the acl for the node * @param createMode * specifying whether the node to be created is ephemeral * and/or sequential */ public static Op create(String path, byte[] data, List<ACL> acl, CreateMode createMode) { return new Create(path, data, acl, createMode); }
@Override Op withChroot(String path) { return new Create(path, data, acl, flags); }
/** * Constructs a create operation. Arguments are as for the ZooKeeper method of the same name * but adding an optional ttl * @see ZooKeeper#create(String, byte[], java.util.List, CreateMode) * @see CreateMode#fromFlag(int) * * @param path * the path for the node * @param data * the initial data for the node * @param acl * the acl for the node * @param flags * specifying whether the node to be created is ephemeral * and/or sequential but using the integer encoding. * @param ttl * optional ttl or 0 (flags must imply a TTL creation mode) */ public static Op create(String path, byte[] data, List<ACL> acl, int flags, long ttl) { CreateMode createMode = CreateMode.fromFlag(flags, CreateMode.PERSISTENT); if (createMode.isTTL()) { return new CreateTTL(path, data, acl, createMode, ttl); } return new Create(path, data, acl, flags); }
/** * Constructs a create operation. Arguments are as for the ZooKeeper method of the same name * but adding an optional ttl * @see ZooKeeper#create(String, byte[], java.util.List, CreateMode) * * @param path * the path for the node * @param data * the initial data for the node * @param acl * the acl for the node * @param createMode * specifying whether the node to be created is ephemeral * and/or sequential * @param ttl * optional ttl or 0 (createMode must imply a TTL) */ public static Op create(String path, byte[] data, List<ACL> acl, CreateMode createMode, long ttl) { if (createMode.isTTL()) { return new CreateTTL(path, data, acl, createMode, ttl); } return new Create(path, data, acl, createMode); }
/** * Constructs a create operation. Arguments are as for the ZooKeeper method of the same name. * @see ZooKeeper#create(String, byte[], java.util.List, CreateMode) * @see CreateMode#fromFlag(int) * * @param path * the path for the node * @param data * the initial data for the node * @param acl * the acl for the node * @param flags * specifying whether the node to be created is ephemeral * and/or sequential but using the integer encoding. */ public static Op create(String path, byte[] data, List<ACL> acl, int flags) { return new Create(path, data, acl, flags); }
/** * Constructs a create operation. Arguments are as for the ZooKeeper method of the same name. * @see ZooKeeper#create(String, byte[], java.util.List, CreateMode) * * @param path * the path for the node * @param data * the initial data for the node * @param acl * the acl for the node * @param createMode * specifying whether the node to be created is ephemeral * and/or sequential */ public static Op create(String path, byte[] data, List<ACL> acl, CreateMode createMode) { return new Create(path, data, acl, createMode); }
@Override Op withChroot(String path) { return new Create(path, data, acl, flags); }