Class RemoveWatchesBuilderImpl
- java.lang.Object
-
- org.apache.curator.framework.imps.RemoveWatchesBuilderImpl
-
- All Implemented Interfaces:
Backgroundable<ErrorListenerPathable<java.lang.Void>>,BackgroundPathable<java.lang.Void>,BackgroundPathableQuietlyable<java.lang.Void>,ErrorListenerPathable<java.lang.Void>,Guaranteeable<BackgroundPathableQuietlyable<java.lang.Void>>,Pathable<java.lang.Void>,Quietly<BackgroundPathable<java.lang.Void>>,RemoveWatchesBuilder,RemoveWatchesLocal,RemoveWatchesType
- Direct Known Subclasses:
WatchesBuilderImpl
public class RemoveWatchesBuilderImpl extends java.lang.Object implements RemoveWatchesBuilder, RemoveWatchesType, RemoveWatchesLocal, ErrorListenerPathable<java.lang.Void>
-
-
Constructor Summary
Constructors Constructor Description RemoveWatchesBuilderImpl(CuratorFrameworkImpl client)RemoveWatchesBuilderImpl(CuratorFrameworkImpl client, org.apache.zookeeper.Watcher watcher, CuratorWatcher curatorWatcher, org.apache.zookeeper.Watcher.WatcherType watcherType, boolean guaranteed, boolean local, boolean quietly, Backgrounding backgrounding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.VoidforPath(java.lang.String path)Commit the currently building operation using the given pathprotected CuratorFrameworkImplgetClient()RemoveWatchesLocalguaranteed()Solves edge cases where an operation may succeed on the server but connection failure occurs before a response can be successfully returned to the client.ErrorListenerPathable<java.lang.Void>inBackground()Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(java.lang.Object context)Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(BackgroundCallback callback)Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(BackgroundCallback callback, java.lang.Object context)Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(BackgroundCallback callback, java.lang.Object context, java.util.concurrent.Executor executor)Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(BackgroundCallback callback, java.util.concurrent.Executor executor)Perform the action in the backgroundBackgroundPathableQuietlyable<java.lang.Void>locally()Specify if the client should just remove client side watches if a connection to ZK is not available.RemoveWatchesLocalofType(org.apache.zookeeper.Watcher.WatcherType watcherType)Specify the type of watcher to be removed.voidperformBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<java.lang.String> operationAndData)BackgroundPathable<java.lang.Void>quietly()RemoveWatchesTyperemove(CuratorWatcher watcher)Specify the watcher to be removedRemoveWatchesTyperemove(org.apache.zookeeper.Watcher watcher)Specify the watcher to be removedRemoveWatchesTyperemoveAll()Specify that all watches should be removedPathable<java.lang.Void>withUnhandledErrorListener(UnhandledErrorListener listener)Set an error listener for this background operation.
-
-
-
Constructor Detail
-
RemoveWatchesBuilderImpl
public RemoveWatchesBuilderImpl(CuratorFrameworkImpl client)
-
RemoveWatchesBuilderImpl
public RemoveWatchesBuilderImpl(CuratorFrameworkImpl client, org.apache.zookeeper.Watcher watcher, CuratorWatcher curatorWatcher, org.apache.zookeeper.Watcher.WatcherType watcherType, boolean guaranteed, boolean local, boolean quietly, Backgrounding backgrounding)
-
-
Method Detail
-
remove
public RemoveWatchesType remove(org.apache.zookeeper.Watcher watcher)
Description copied from interface:RemoveWatchesBuilderSpecify the watcher to be removed- Specified by:
removein interfaceRemoveWatchesBuilder- Returns:
-
remove
public RemoveWatchesType remove(CuratorWatcher watcher)
Description copied from interface:RemoveWatchesBuilderSpecify the watcher to be removed- Specified by:
removein interfaceRemoveWatchesBuilder- Returns:
-
removeAll
public RemoveWatchesType removeAll()
Description copied from interface:RemoveWatchesBuilderSpecify that all watches should be removed- Specified by:
removeAllin interfaceRemoveWatchesBuilder- Returns:
-
ofType
public RemoveWatchesLocal ofType(org.apache.zookeeper.Watcher.WatcherType watcherType)
Description copied from interface:RemoveWatchesTypeSpecify the type of watcher to be removed.- Specified by:
ofTypein interfaceRemoveWatchesType- Returns:
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground(BackgroundCallback callback, java.lang.Object context)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- 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<java.lang.Void> 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<java.lang.Void>>- 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<java.lang.Void> inBackground(BackgroundCallback callback)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Parameters:
callback- a functor that will get called when the operation has completed- Returns:
- this
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground(BackgroundCallback callback, java.util.concurrent.Executor executor)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- 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<java.lang.Void> inBackground()
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Returns:
- this
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground(java.lang.Object context)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Parameters:
context- context object - will be available from the event sent to the listener- Returns:
- this
-
withUnhandledErrorListener
public Pathable<java.lang.Void> 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<java.lang.Void>- Parameters:
listener- the listener- Returns:
- this for chaining
-
guaranteed
public RemoveWatchesLocal guaranteed()
Description copied from interface:GuaranteeableSolves edge cases where an operation may succeed on the server but connection failure occurs before a response can be successfully returned to the client.- Specified by:
guaranteedin interfaceGuaranteeable<BackgroundPathableQuietlyable<java.lang.Void>>- Returns:
- this
- See Also:
GuaranteeableDeletable
-
locally
public BackgroundPathableQuietlyable<java.lang.Void> locally()
Description copied from interface:RemoveWatchesLocalSpecify if the client should just remove client side watches if a connection to ZK is not available. Note that the standard Curator retry loop will not be used in t- Specified by:
locallyin interfaceRemoveWatchesLocal- Returns:
-
quietly
public BackgroundPathable<java.lang.Void> quietly()
- Specified by:
quietlyin interfaceQuietly<BackgroundPathable<java.lang.Void>>
-
forPath
public java.lang.Void forPath(java.lang.String path) throws java.lang.ExceptionDescription copied from interface:PathableCommit the currently building operation using the given path
-
getClient
protected CuratorFrameworkImpl getClient()
-
performBackgroundOperation
public void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<java.lang.String> operationAndData) throws java.lang.Exception- Throws:
java.lang.Exception
-
-