public class ModelSpecBuilder<T> extends Object
Modifier and Type | Method and Description |
---|---|
ModelSpec<T> |
build()
Build a new ModelSpec instance
|
ModelSpecBuilder<T> |
withAclList(List<org.apache.zookeeper.data.ACL> aclList)
Use the given aclList for create operations on the Modeled Curator's ZNode
|
ModelSpecBuilder<T> |
withCreateMode(org.apache.zookeeper.CreateMode createMode)
Use the given createMode for create operations on the Modeled Curator's ZNode
|
ModelSpecBuilder<T> |
withCreateOptions(Set<CreateOption> createOptions)
Use the given create options on the Modeled Curator's ZNode
|
ModelSpecBuilder<T> |
withDeleteOptions(Set<DeleteOption> deleteOptions)
Use the given delete options on the Modeled Curator's ZNode
|
ModelSpecBuilder<T> |
withPath(ZPath path)
Change the model spec's path
|
ModelSpecBuilder<T> |
withTtl(long ttl)
Specify a TTL when mode is
CreateMode.PERSISTENT_WITH_TTL or
CreateMode.PERSISTENT_SEQUENTIAL_WITH_TTL . |
public ModelSpecBuilder<T> withCreateMode(org.apache.zookeeper.CreateMode createMode)
createMode
- create modepublic ModelSpecBuilder<T> withTtl(long ttl)
CreateMode.PERSISTENT_WITH_TTL
or
CreateMode.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.ttl
- the ttlpublic ModelSpecBuilder<T> withAclList(List<org.apache.zookeeper.data.ACL> aclList)
aclList
- ACLspublic ModelSpecBuilder<T> withCreateOptions(Set<CreateOption> createOptions)
createOptions
- optionspublic ModelSpecBuilder<T> withDeleteOptions(Set<DeleteOption> deleteOptions)
deleteOptions
- optionspublic ModelSpecBuilder<T> withPath(ZPath path)
path
- new pathCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.