public class ExistsBuilderImpl extends Object implements ExistsBuilder, ErrorListenerPathable<org.apache.zookeeper.data.Stat>, ACLableExistBuilderMain
Constructor and Description |
---|
ExistsBuilderImpl(CuratorFrameworkImpl client,
Backgrounding backgrounding,
org.apache.zookeeper.Watcher watcher,
boolean createParentsIfNeeded,
boolean createParentContainersIfNeeded) |
Modifier and Type | Method and Description |
---|---|
ACLableExistBuilderMain |
creatingParentContainersIfNeeded()
Causes any parent nodes to get created using
CreateMode.CONTAINER if they haven't already been. |
ACLableExistBuilderMain |
creatingParentsIfNeeded()
Causes any parent nodes to get created if they haven't already been
|
org.apache.zookeeper.data.Stat |
forPath(String path)
Commit the currently building operation using the given path
|
ErrorListenerPathable<org.apache.zookeeper.data.Stat> |
inBackground()
Perform the action in the background
|
ErrorListenerPathable<org.apache.zookeeper.data.Stat> |
inBackground(BackgroundCallback callback)
Perform the action in the background
|
ErrorListenerPathable<org.apache.zookeeper.data.Stat> |
inBackground(BackgroundCallback callback,
Executor executor)
Perform the action in the background
|
ErrorListenerPathable<org.apache.zookeeper.data.Stat> |
inBackground(BackgroundCallback callback,
Object context)
Perform the action in the background
|
ErrorListenerPathable<org.apache.zookeeper.data.Stat> |
inBackground(BackgroundCallback callback,
Object context,
Executor executor)
Perform the action in the background
|
ErrorListenerPathable<org.apache.zookeeper.data.Stat> |
inBackground(Object context)
Perform the action in the background
|
void |
performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<String> operationAndData) |
BackgroundPathable<org.apache.zookeeper.data.Stat> |
usingWatcher(CuratorWatcher watcher)
Set a watcher for the operation
|
BackgroundPathable<org.apache.zookeeper.data.Stat> |
usingWatcher(org.apache.zookeeper.Watcher watcher)
Set a watcher for the operation
|
BackgroundPathable<org.apache.zookeeper.data.Stat> |
watched()
Have the operation set a watch
|
ExistsBuilderMain |
withACL(List<org.apache.zookeeper.data.ACL> aclList)
Set an ACL list (default is
ZooDefs.Ids#OPEN_ACL_UNSAFE ) |
Pathable<org.apache.zookeeper.data.Stat> |
withUnhandledErrorListener(UnhandledErrorListener listener)
Set an error listener for this background operation.
|
public ExistsBuilderImpl(CuratorFrameworkImpl client, Backgrounding backgrounding, org.apache.zookeeper.Watcher watcher, boolean createParentsIfNeeded, boolean createParentContainersIfNeeded)
public ACLableExistBuilderMain creatingParentsIfNeeded()
ExistsBuilder
creatingParentsIfNeeded
in interface ExistsBuilder
public ACLableExistBuilderMain creatingParentContainersIfNeeded()
ExistsBuilder
CreateMode.CONTAINER
if they haven't already been.
IMPORTANT NOTE: container creation is a new feature in recent versions of ZooKeeper.
If the ZooKeeper version you're using does not support containers, the parent nodes
are created as ordinary PERSISTENT nodes.creatingParentContainersIfNeeded
in interface ExistsBuilder
public ExistsBuilderMain withACL(List<org.apache.zookeeper.data.ACL> aclList)
ACLable
ZooDefs.Ids#OPEN_ACL_UNSAFE
)withACL
in interface ACLable<ExistsBuilderMain>
aclList
- the ACL list to usepublic BackgroundPathable<org.apache.zookeeper.data.Stat> watched()
Watchable
watched
in interface Watchable<BackgroundPathable<org.apache.zookeeper.data.Stat>>
public BackgroundPathable<org.apache.zookeeper.data.Stat> usingWatcher(org.apache.zookeeper.Watcher watcher)
WatchableBase
usingWatcher
in interface WatchableBase<BackgroundPathable<org.apache.zookeeper.data.Stat>>
watcher
- the watcherpublic BackgroundPathable<org.apache.zookeeper.data.Stat> usingWatcher(CuratorWatcher watcher)
WatchableBase
usingWatcher
in interface WatchableBase<BackgroundPathable<org.apache.zookeeper.data.Stat>>
watcher
- the watcherpublic ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, Object context)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
callback
- a functor that will get called when the operation has completedcontext
- context object - will be available from the event sent to the listenerpublic ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, Object context, Executor executor)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
callback
- a functor that will get called when the operation has completedcontext
- context object - will be available from the event sent to the listenerexecutor
- executor to use for the background callpublic ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
callback
- a functor that will get called when the operation has completedpublic ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, Executor executor)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
callback
- a functor that will get called when the operation has completedexecutor
- executor to use for the background callpublic ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground()
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(Object context)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
context
- context object - will be available from the event sent to the listenerpublic Pathable<org.apache.zookeeper.data.Stat> withUnhandledErrorListener(UnhandledErrorListener listener)
ErrorListenerPathable
withUnhandledErrorListener
in interface ErrorListenerPathable<org.apache.zookeeper.data.Stat>
listener
- the listenerpublic void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<String> operationAndData) throws Exception
Exception
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.