Class AddWatchBuilderImpl

    • Method Detail

      • withMode

        public AddWatchBuilder2 withMode​(org.apache.zookeeper.AddWatchMode mode)
        Description copied from interface: AddWatchBuilder
        The mode to use. By default, AddWatchMode.PERSISTENT_RECURSIVE is used
        Specified by:
        withMode in interface AddWatchBuilder
        Parameters:
        mode - mode to use
        Returns:
        this
      • usingWatcher

        public Pathable<java.lang.Void> usingWatcher​(org.apache.zookeeper.Watcher watcher)
        Description copied from interface: WatchableBase
        Set a watcher for the operation
        Specified by:
        usingWatcher in interface WatchableBase<Pathable<java.lang.Void>>
        Parameters:
        watcher - the watcher
        Returns:
        this
      • inBackground

        public WatchableBase<Pathable<java.lang.Void>> inBackground​(BackgroundCallback callback,
                                                                    java.lang.Object context)
        Description copied from interface: Backgroundable
        Perform the action in the background
        Specified by:
        inBackground in interface Backgroundable<WatchableBase<Pathable<java.lang.Void>>>
        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 WatchableBase<Pathable<java.lang.Void>> 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<WatchableBase<Pathable<java.lang.Void>>>
        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
      • forPath

        public java.lang.Void 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<java.lang.Void>
        Parameters:
        path - the path
        Returns:
        operation result if any
        Throws:
        java.lang.Exception - errors
      • performBackgroundOperation

        public void performBackgroundOperation​(org.apache.curator.framework.imps.OperationAndData<java.lang.String> data)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception