Class AddWatchBuilderImpl
java.lang.Object
org.apache.curator.framework.imps.AddWatchBuilderImpl
- All Implemented Interfaces:
AddWatchBuilder
,AddWatchBuilder2
,Backgroundable<WatchableBase<Pathable<Void>>>
,Pathable<Void>
,WatchableBase<Pathable<Void>>
-
Constructor Summary
ConstructorDescriptionAddWatchBuilderImpl
(CuratorFrameworkImpl client, Watching watching, Backgrounding backgrounding, org.apache.zookeeper.AddWatchMode mode) -
Method Summary
Modifier and TypeMethodDescriptionCommit the currently building operation using the given pathPerform 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 backgroundvoid
performBackgroundOperation
(org.apache.curator.framework.imps.OperationAndData<String> data) usingWatcher
(CuratorWatcher watcher) Set a watcher for the operationusingWatcher
(org.apache.zookeeper.Watcher watcher) Set a watcher for the operationwithMode
(org.apache.zookeeper.AddWatchMode mode) The mode to use.
-
Constructor Details
-
AddWatchBuilderImpl
public AddWatchBuilderImpl(CuratorFrameworkImpl client, Watching watching, Backgrounding backgrounding, org.apache.zookeeper.AddWatchMode mode)
-
-
Method Details
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<WatchableBase<Pathable<Void>>>
- Returns:
- this
-
withMode
Description copied from interface:AddWatchBuilder
The mode to use. By default,AddWatchMode.PERSISTENT_RECURSIVE
is used- Specified by:
withMode
in interfaceAddWatchBuilder
- Parameters:
mode
- mode to use- Returns:
- this
-
usingWatcher
Description copied from interface:WatchableBase
Set a watcher for the operation- Specified by:
usingWatcher
in interfaceWatchableBase<Pathable<Void>>
- Parameters:
watcher
- the watcher- Returns:
- this
-
usingWatcher
Description copied from interface:WatchableBase
Set a watcher for the operation- Specified by:
usingWatcher
in interfaceWatchableBase<Pathable<Void>>
- Parameters:
watcher
- the watcher- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<WatchableBase<Pathable<Void>>>
- Parameters:
context
- context object - will be available from the event sent to the listener- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<WatchableBase<Pathable<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<WatchableBase<Pathable<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
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<WatchableBase<Pathable<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 WatchableBase<Pathable<Void>> inBackground(BackgroundCallback callback, Object context, Executor executor) Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<WatchableBase<Pathable<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
-
forPath
Description copied from interface:Pathable
Commit the currently building operation using the given path -
getBackgroundEventType
-
performBackgroundOperation
public void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<String> data) throws Exception - Throws:
Exception
-