Class ExistsBuilderImpl
- java.lang.Object
-
- org.apache.curator.framework.imps.ExistsBuilderImpl
-
- All Implemented Interfaces:
ACLable<ExistsBuilderMain>,ACLableExistBuilderMain,Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>,BackgroundPathable<org.apache.zookeeper.data.Stat>,ErrorListenerPathable<org.apache.zookeeper.data.Stat>,ExistsBuilder,ExistsBuilderMain,Pathable<org.apache.zookeeper.data.Stat>,Watchable<BackgroundPathable<org.apache.zookeeper.data.Stat>>,WatchableBase<BackgroundPathable<org.apache.zookeeper.data.Stat>>
public class ExistsBuilderImpl extends java.lang.Object implements ExistsBuilder, ErrorListenerPathable<org.apache.zookeeper.data.Stat>, ACLableExistBuilderMain
-
-
Constructor Summary
Constructors Constructor Description ExistsBuilderImpl(CuratorFrameworkImpl client, Backgrounding backgrounding, org.apache.zookeeper.Watcher watcher, boolean createParentsIfNeeded, boolean createParentContainersIfNeeded)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ACLableExistBuilderMaincreatingParentContainersIfNeeded()Causes any parent nodes to get created usingCreateMode.CONTAINERif they haven't already been.ACLableExistBuilderMaincreatingParentsIfNeeded()Causes any parent nodes to get created if they haven't already beenorg.apache.zookeeper.data.StatforPath(java.lang.String path)Commit the currently building operation using the given pathErrorListenerPathable<org.apache.zookeeper.data.Stat>inBackground()Perform the action in the backgroundErrorListenerPathable<org.apache.zookeeper.data.Stat>inBackground(java.lang.Object context)Perform the action in the backgroundErrorListenerPathable<org.apache.zookeeper.data.Stat>inBackground(BackgroundCallback callback)Perform the action in the backgroundErrorListenerPathable<org.apache.zookeeper.data.Stat>inBackground(BackgroundCallback callback, java.lang.Object context)Perform the action in the backgroundErrorListenerPathable<org.apache.zookeeper.data.Stat>inBackground(BackgroundCallback callback, java.lang.Object context, java.util.concurrent.Executor executor)Perform the action in the backgroundErrorListenerPathable<org.apache.zookeeper.data.Stat>inBackground(BackgroundCallback callback, java.util.concurrent.Executor executor)Perform the action in the backgroundvoidperformBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<java.lang.String> operationAndData)BackgroundPathable<org.apache.zookeeper.data.Stat>usingWatcher(CuratorWatcher watcher)Set a watcher for the operationBackgroundPathable<org.apache.zookeeper.data.Stat>usingWatcher(org.apache.zookeeper.Watcher watcher)Set a watcher for the operationBackgroundPathable<org.apache.zookeeper.data.Stat>watched()Have the operation set a watchExistsBuilderMainwithACL(java.util.List<org.apache.zookeeper.data.ACL> aclList)Set an ACL list (default isZooDefs.Ids.OPEN_ACL_UNSAFE)Pathable<org.apache.zookeeper.data.Stat>withUnhandledErrorListener(UnhandledErrorListener listener)Set an error listener for this background operation.
-
-
-
Constructor Detail
-
ExistsBuilderImpl
public ExistsBuilderImpl(CuratorFrameworkImpl client, Backgrounding backgrounding, org.apache.zookeeper.Watcher watcher, boolean createParentsIfNeeded, boolean createParentContainersIfNeeded)
-
-
Method Detail
-
creatingParentsIfNeeded
public ACLableExistBuilderMain creatingParentsIfNeeded()
Description copied from interface:ExistsBuilderCauses any parent nodes to get created if they haven't already been- Specified by:
creatingParentsIfNeededin interfaceExistsBuilder- Returns:
- this
-
creatingParentContainersIfNeeded
public ACLableExistBuilderMain creatingParentContainersIfNeeded()
Description copied from interface:ExistsBuilderCauses any parent nodes to get created usingCreateMode.CONTAINERif 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.- Specified by:
creatingParentContainersIfNeededin interfaceExistsBuilder- Returns:
- this
-
withACL
public ExistsBuilderMain withACL(java.util.List<org.apache.zookeeper.data.ACL> aclList)
Description copied from interface:ACLableSet an ACL list (default isZooDefs.Ids.OPEN_ACL_UNSAFE)- Specified by:
withACLin interfaceACLable<ExistsBuilderMain>- Parameters:
aclList- the ACL list to use- Returns:
- this
-
watched
public BackgroundPathable<org.apache.zookeeper.data.Stat> watched()
Description copied from interface:WatchableHave the operation set a watch- Specified by:
watchedin interfaceWatchable<BackgroundPathable<org.apache.zookeeper.data.Stat>>- Returns:
- this
-
usingWatcher
public BackgroundPathable<org.apache.zookeeper.data.Stat> usingWatcher(org.apache.zookeeper.Watcher watcher)
Description copied from interface:WatchableBaseSet a watcher for the operation- Specified by:
usingWatcherin interfaceWatchableBase<BackgroundPathable<org.apache.zookeeper.data.Stat>>- Parameters:
watcher- the watcher- Returns:
- this
-
usingWatcher
public BackgroundPathable<org.apache.zookeeper.data.Stat> usingWatcher(CuratorWatcher watcher)
Description copied from interface:WatchableBaseSet a watcher for the operation- Specified by:
usingWatcherin interfaceWatchableBase<BackgroundPathable<org.apache.zookeeper.data.Stat>>- Parameters:
watcher- the watcher- Returns:
- this
-
inBackground
public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, java.lang.Object context)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>- Parameters:
callback- a functor that will get called when the operation has completedcontext- context object - will be available from the event sent to the listener- Returns:
- this
-
inBackground
public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, java.lang.Object context, java.util.concurrent.Executor executor)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>- Parameters:
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 call- Returns:
- this
-
inBackground
public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>- Parameters:
callback- a functor that will get called when the operation has completed- Returns:
- this
-
inBackground
public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(BackgroundCallback callback, java.util.concurrent.Executor executor)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>- Parameters:
callback- a functor that will get called when the operation has completedexecutor- executor to use for the background call- Returns:
- this
-
inBackground
public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground()
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>- Returns:
- this
-
inBackground
public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground(java.lang.Object context)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>- Parameters:
context- context object - will be available from the event sent to the listener- Returns:
- this
-
withUnhandledErrorListener
public Pathable<org.apache.zookeeper.data.Stat> withUnhandledErrorListener(UnhandledErrorListener listener)
Description copied from interface:ErrorListenerPathableSet an error listener for this background operation. If an exception occurs while processing the call in the background, this listener will be called- Specified by:
withUnhandledErrorListenerin interfaceErrorListenerPathable<org.apache.zookeeper.data.Stat>- Parameters:
listener- the listener- Returns:
- this for chaining
-
performBackgroundOperation
public void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<java.lang.String> operationAndData) throws java.lang.Exception- Throws:
java.lang.Exception
-
forPath
public org.apache.zookeeper.data.Stat forPath(java.lang.String path) throws java.lang.ExceptionDescription copied from interface:PathableCommit the currently building operation using the given path
-
-