Class RemoveWatchesBuilderImpl
java.lang.Object
org.apache.curator.framework.imps.RemoveWatchesBuilderImpl
- All Implemented Interfaces:
Backgroundable<ErrorListenerPathable<Void>>
,BackgroundPathable<Void>
,BackgroundPathableQuietlyable<Void>
,ErrorListenerPathable<Void>
,Guaranteeable<BackgroundPathableQuietlyable<Void>>
,Pathable<Void>
,Quietly<BackgroundPathable<Void>>
,RemoveWatchesBuilder
,RemoveWatchesLocal
,RemoveWatchesType
- Direct Known Subclasses:
WatchesBuilderImpl
public class RemoveWatchesBuilderImpl
extends Object
implements RemoveWatchesBuilder, RemoveWatchesType, RemoveWatchesLocal, ErrorListenerPathable<Void>
-
Constructor Summary
ConstructorDescriptionRemoveWatchesBuilderImpl
(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
Modifier and TypeMethodDescriptionCommit the currently building operation using the given pathprotected CuratorFrameworkImpl
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.Perform the action in the backgroundinBackground
(Object context) Perform the action in the backgroundinBackground
(BackgroundCallback callback) Perform the action in the backgroundinBackground
(BackgroundCallback callback, Object context) Perform the action in the backgroundinBackground
(BackgroundCallback callback, Object context, Executor executor) Perform the action in the backgroundinBackground
(BackgroundCallback callback, Executor executor) Perform the action in the backgroundlocally()
Specify if the client should just remove client side watches if a connection to ZK is not available.ofType
(org.apache.zookeeper.Watcher.WatcherType watcherType) Specify the type of watcher to be removed.void
performBackgroundOperation
(org.apache.curator.framework.imps.OperationAndData<String> operationAndData) quietly()
remove
(CuratorWatcher watcher) Specify the watcher to be removedremove
(org.apache.zookeeper.Watcher watcher) Specify the watcher to be removedSpecify that all watches should be removedSet an error listener for this background operation.
-
Constructor Details
-
RemoveWatchesBuilderImpl
-
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 Details
-
remove
Description copied from interface:RemoveWatchesBuilder
Specify the watcher to be removed- Specified by:
remove
in interfaceRemoveWatchesBuilder
- Parameters:
watcher
-- Returns:
-
remove
Description copied from interface:RemoveWatchesBuilder
Specify the watcher to be removed- Specified by:
remove
in interfaceRemoveWatchesBuilder
- Parameters:
watcher
-- Returns:
-
removeAll
Description copied from interface:RemoveWatchesBuilder
Specify that all watches should be removed- Specified by:
removeAll
in interfaceRemoveWatchesBuilder
- Returns:
-
ofType
Description copied from interface:RemoveWatchesType
Specify the type of watcher to be removed.- Specified by:
ofType
in interfaceRemoveWatchesType
- Parameters:
watcherType
-- Returns:
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<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<Void> inBackground(BackgroundCallback callback, Object context, Executor executor) Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<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
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<Void>>
- Parameters:
callback
- a functor that will get called when the operation has completed- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<Void>>
- Parameters:
callback
- a functor that will get called when the operation has completedexecutor
- executor to use for the background call- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<Void>>
- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<Void>>
- Parameters:
context
- context object - will be available from the event sent to the listener- Returns:
- this
-
withUnhandledErrorListener
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 interfaceErrorListenerPathable<Void>
- Parameters:
listener
- the listener- Returns:
- this for chaining
-
guaranteed
Description copied from interface:Guaranteeable
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.- Specified by:
guaranteed
in interfaceGuaranteeable<BackgroundPathableQuietlyable<Void>>
- Returns:
- this
- See Also:
-
locally
Description copied from interface:RemoveWatchesLocal
Specify 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:
locally
in interfaceRemoveWatchesLocal
- Returns:
-
quietly
- Specified by:
quietly
in interfaceQuietly<BackgroundPathable<Void>>
-
forPath
Description copied from interface:Pathable
Commit the currently building operation using the given path -
getClient
-
getBackgroundEventType
-
performBackgroundOperation
public void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<String> operationAndData) throws Exception - Throws:
Exception
-