Class ModelSpecBuilder<T>
- java.lang.Object
-
- org.apache.curator.x.async.modeled.ModelSpecBuilder<T>
-
public class ModelSpecBuilder<T> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelSpec<T>build()Build a new ModelSpec instanceModelSpecBuilder<T>withAclList(java.util.List<org.apache.zookeeper.data.ACL> aclList)Use the given aclList for create operations on the Modeled Curator's ZNodeModelSpecBuilder<T>withCreateMode(org.apache.zookeeper.CreateMode createMode)Use the given createMode for create operations on the Modeled Curator's ZNodeModelSpecBuilder<T>withCreateOptions(java.util.Set<CreateOption> createOptions)Use the given create options on the Modeled Curator's ZNodeModelSpecBuilder<T>withDeleteOptions(java.util.Set<DeleteOption> deleteOptions)Use the given delete options on the Modeled Curator's ZNodeModelSpecBuilder<T>withPath(ZPath path)Change the model spec's pathModelSpecBuilder<T>withTtl(long ttl)Specify a TTL when mode isCreateMode.PERSISTENT_WITH_TTLorCreateMode.PERSISTENT_SEQUENTIAL_WITH_TTL.
-
-
-
Method Detail
-
withCreateMode
public ModelSpecBuilder<T> withCreateMode(org.apache.zookeeper.CreateMode createMode)
Use the given createMode for create operations on the Modeled Curator's ZNode- Parameters:
createMode- create mode- Returns:
- this for chaining
-
withTtl
public ModelSpecBuilder<T> withTtl(long ttl)
Specify a TTL when mode isCreateMode.PERSISTENT_WITH_TTLorCreateMode.PERSISTENT_SEQUENTIAL_WITH_TTL. If the znode has not been modified within the given TTL, it will be deleted once it has no children. The TTL unit is milliseconds and must be greater than 0 and less than or equal to EphemeralType.MAX_TTL.- Parameters:
ttl- the ttl- Returns:
- this for chaining
-
withAclList
public ModelSpecBuilder<T> withAclList(java.util.List<org.apache.zookeeper.data.ACL> aclList)
Use the given aclList for create operations on the Modeled Curator's ZNode- Parameters:
aclList- ACLs- Returns:
- this for chaining
-
withCreateOptions
public ModelSpecBuilder<T> withCreateOptions(java.util.Set<CreateOption> createOptions)
Use the given create options on the Modeled Curator's ZNode- Parameters:
createOptions- options- Returns:
- this for chaining
-
withDeleteOptions
public ModelSpecBuilder<T> withDeleteOptions(java.util.Set<DeleteOption> deleteOptions)
Use the given delete options on the Modeled Curator's ZNode- Parameters:
deleteOptions- options- Returns:
- this for chaining
-
withPath
public ModelSpecBuilder<T> withPath(ZPath path)
Change the model spec's path- Parameters:
path- new path- Returns:
- this for chaining
-
-