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
ConstructorsConstructorDescriptionAddWatchBuilderImpl(CuratorFrameworkBase 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 backgroundvoidperformBackgroundOperation(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(CuratorFrameworkBase client, Watching watching, Backgrounding backgrounding, org.apache.zookeeper.AddWatchMode mode)
-
-
Method Details
-
inBackground
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<WatchableBase<Pathable<Void>>>- Returns:
- this
-
withMode
Description copied from interface:AddWatchBuilderThe mode to use. By default,AddWatchMode.PERSISTENT_RECURSIVEis used- Specified by:
withModein interfaceAddWatchBuilder- Parameters:
mode- mode to use- Returns:
- this
-
usingWatcher
Description copied from interface:WatchableBaseSet a watcher for the operation- Specified by:
usingWatcherin interfaceWatchableBase<Pathable<Void>>- Parameters:
watcher- the watcher- Returns:
- this
-
usingWatcher
Description copied from interface:WatchableBaseSet a watcher for the operation- Specified by:
usingWatcherin interfaceWatchableBase<Pathable<Void>>- Parameters:
watcher- the watcher- Returns:
- this
-
inBackground
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin 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:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<WatchableBase<Pathable<Void>>>- Parameters:
callback- a functor that will get called when the operation has completed- Returns:
- this
-
inBackground
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin 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:BackgroundablePerform the action in the background- Specified by:
inBackgroundin 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:BackgroundablePerform the action in the background- Specified by:
inBackgroundin 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:PathableCommit 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
-