Class ExistsBuilderImpl

    • Constructor Detail

      • ExistsBuilderImpl

        public ExistsBuilderImpl​(CuratorFrameworkImpl client,
                                 Backgrounding backgrounding,
                                 org.apache.zookeeper.Watcher watcher,
                                 boolean createParentsIfNeeded,
                                 boolean createParentContainersIfNeeded)
    • Method Detail

      • creatingParentContainersIfNeeded

        public ACLableExistBuilderMain creatingParentContainersIfNeeded()
        Description copied from interface: ExistsBuilder
        Causes any parent nodes to get created using 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.
        Specified by:
        creatingParentContainersIfNeeded in interface ExistsBuilder
        Returns:
        this
      • withACL

        public ExistsBuilderMain withACL​(java.util.List<org.apache.zookeeper.data.ACL> aclList)
        Description copied from interface: ACLable
        Set an ACL list (default is ZooDefs.Ids.OPEN_ACL_UNSAFE)
        Specified by:
        withACL in interface ACLable<ExistsBuilderMain>
        Parameters:
        aclList - the ACL list to use
        Returns:
        this
      • usingWatcher

        public BackgroundPathable<org.apache.zookeeper.data.Stat> usingWatcher​(org.apache.zookeeper.Watcher watcher)
        Description copied from interface: Watchable
        Set a watcher for the operation
        Specified by:
        usingWatcher in interface Watchable<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: Backgroundable
        Perform the action in the background
        Specified by:
        inBackground in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
        Parameters:
        callback - a functor that will get called when the operation has completed
        context - 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: Backgroundable
        Perform the action in the background
        Specified by:
        inBackground in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
        Parameters:
        callback - a functor that will get called when the operation has completed
        context - context object - will be available from the event sent to the listener
        executor - executor to use for the background call
        Returns:
        this
      • inBackground

        public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground​(BackgroundCallback callback,
                                                                                  java.util.concurrent.Executor executor)
        Description copied from interface: Backgroundable
        Perform the action in the background
        Specified by:
        inBackground in interface Backgroundable<ErrorListenerPathable<org.apache.zookeeper.data.Stat>>
        Parameters:
        callback - a functor that will get called when the operation has completed
        executor - executor to use for the background call
        Returns:
        this
      • inBackground

        public ErrorListenerPathable<org.apache.zookeeper.data.Stat> inBackground​(java.lang.Object context)
        Description copied from interface: Backgroundable
        Perform the action in the background
        Specified by:
        inBackground in interface Backgroundable<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: ErrorListenerPathable
        Set 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:
        withUnhandledErrorListener in interface ErrorListenerPathable<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.Exception
        Description copied from interface: Pathable
        Commit the currently building operation using the given path
        Specified by:
        forPath in interface Pathable<org.apache.zookeeper.data.Stat>
        Parameters:
        path - the path
        Returns:
        operation result if any
        Throws:
        java.lang.Exception - errors