public class AddWatchBuilderImpl extends Object implements AddWatchBuilder, Pathable<Void>
Constructor and Description |
---|
AddWatchBuilderImpl(CuratorFrameworkImpl client,
Watching watching,
Backgrounding backgrounding,
org.apache.zookeeper.AddWatchMode mode) |
Modifier and Type | Method and Description |
---|---|
Void |
forPath(String path)
Commit the currently building operation using the given path
|
WatchableBase<Pathable<Void>> |
inBackground()
Perform the action in the background
|
WatchableBase<Pathable<Void>> |
inBackground(BackgroundCallback callback)
Perform the action in the background
|
WatchableBase<Pathable<Void>> |
inBackground(BackgroundCallback callback,
Executor executor)
Perform the action in the background
|
WatchableBase<Pathable<Void>> |
inBackground(BackgroundCallback callback,
Object context)
Perform the action in the background
|
WatchableBase<Pathable<Void>> |
inBackground(BackgroundCallback callback,
Object context,
Executor executor)
Perform the action in the background
|
WatchableBase<Pathable<Void>> |
inBackground(Object context)
Perform the action in the background
|
void |
performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<String> data) |
Pathable<Void> |
usingWatcher(CuratorWatcher watcher)
Set a watcher for the operation
|
Pathable<Void> |
usingWatcher(org.apache.zookeeper.Watcher watcher)
Set a watcher for the operation
|
AddWatchBuilder2 |
withMode(org.apache.zookeeper.AddWatchMode mode)
The mode to use.
|
public AddWatchBuilderImpl(CuratorFrameworkImpl client, Watching watching, Backgrounding backgrounding, org.apache.zookeeper.AddWatchMode mode)
public WatchableBase<Pathable<Void>> inBackground()
Backgroundable
inBackground
in interface Backgroundable<WatchableBase<Pathable<Void>>>
public AddWatchBuilder2 withMode(org.apache.zookeeper.AddWatchMode mode)
AddWatchBuilder
AddWatchMode.PERSISTENT_RECURSIVE
is usedwithMode
in interface AddWatchBuilder
mode
- mode to usepublic Pathable<Void> usingWatcher(org.apache.zookeeper.Watcher watcher)
WatchableBase
usingWatcher
in interface WatchableBase<Pathable<Void>>
watcher
- the watcherpublic Pathable<Void> usingWatcher(CuratorWatcher watcher)
WatchableBase
usingWatcher
in interface WatchableBase<Pathable<Void>>
watcher
- the watcherpublic WatchableBase<Pathable<Void>> inBackground(Object context)
Backgroundable
inBackground
in interface Backgroundable<WatchableBase<Pathable<Void>>>
context
- context object - will be available from the event sent to the listenerpublic WatchableBase<Pathable<Void>> inBackground(BackgroundCallback callback)
Backgroundable
inBackground
in interface Backgroundable<WatchableBase<Pathable<Void>>>
callback
- a functor that will get called when the operation has completedpublic WatchableBase<Pathable<Void>> inBackground(BackgroundCallback callback, Object context)
Backgroundable
inBackground
in interface Backgroundable<WatchableBase<Pathable<Void>>>
callback
- a functor that will get called when the operation has completedcontext
- context object - will be available from the event sent to the listenerpublic WatchableBase<Pathable<Void>> inBackground(BackgroundCallback callback, Executor executor)
Backgroundable
inBackground
in interface Backgroundable<WatchableBase<Pathable<Void>>>
callback
- a functor that will get called when the operation has completedexecutor
- executor to use for the background callpublic WatchableBase<Pathable<Void>> inBackground(BackgroundCallback callback, Object context, Executor executor)
Backgroundable
inBackground
in interface Backgroundable<WatchableBase<Pathable<Void>>>
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 callpublic Void forPath(String path) throws Exception
Pathable
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.