Class ModelSpecBuilder<T>
java.lang.Object
org.apache.curator.x.async.modeled.ModelSpecBuilder<T>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a new ModelSpec instancewithAclList
(List<org.apache.zookeeper.data.ACL> aclList) Use the given aclList for create operations on the Modeled Curator's ZNodewithCreateMode
(org.apache.zookeeper.CreateMode createMode) Use the given createMode for create operations on the Modeled Curator's ZNodewithCreateOptions
(Set<CreateOption> createOptions) Use the given create options on the Modeled Curator's ZNodewithDeleteOptions
(Set<DeleteOption> deleteOptions) Use the given delete options on the Modeled Curator's ZNodeChange the model spec's pathwithTtl
(long ttl) Specify a TTL when mode isCreateMode.PERSISTENT_WITH_TTL
orCreateMode.PERSISTENT_SEQUENTIAL_WITH_TTL
.
-
Method Details
-
build
Build a new ModelSpec instance- Returns:
- new ModelSpec instance
-
withCreateMode
Use the given createMode for create operations on the Modeled Curator's ZNode- Parameters:
createMode
- create mode- Returns:
- this for chaining
-
withTtl
Specify a TTL when mode isCreateMode.PERSISTENT_WITH_TTL
orCreateMode.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
Use the given aclList for create operations on the Modeled Curator's ZNode- Parameters:
aclList
- ACLs- Returns:
- this for chaining
-
withCreateOptions
Use the given create options on the Modeled Curator's ZNode- Parameters:
createOptions
- options- Returns:
- this for chaining
-
withDeleteOptions
Use the given delete options on the Modeled Curator's ZNode- Parameters:
deleteOptions
- options- Returns:
- this for chaining
-
withPath
Change the model spec's path- Parameters:
path
- new path- Returns:
- this for chaining
-