Package org.apache.curator.x.async
Interface AsyncCuratorFramework
-
- All Superinterfaces:
AsyncCuratorFrameworkDsl,WatchableAsyncCuratorFramework
- All Known Implementing Classes:
AsyncCuratorFrameworkImpl
public interface AsyncCuratorFramework extends AsyncCuratorFrameworkDsl
Zookeeper framework-style client that returns composable async operations that implementCompletionStage
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.curator.framework.CuratorFrameworkunwrap()Returns the client that was originally passed towrap(org.apache.curator.framework.CuratorFramework)AsyncCuratorFrameworkDslwith(java.util.function.UnaryOperator<org.apache.curator.framework.api.CuratorEvent> resultFilter, java.util.function.UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter)Returns a facade that adds the the given filters to all background operations and watchers.AsyncCuratorFrameworkDslwith(org.apache.curator.framework.api.UnhandledErrorListener listener)Returns a facade that adds the given UnhandledErrorListener to all background operationsAsyncCuratorFrameworkDslwith(org.apache.curator.framework.api.UnhandledErrorListener listener, java.util.function.UnaryOperator<org.apache.curator.framework.api.CuratorEvent> resultFilter, java.util.function.UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter)Set any combination of listener or filtersAsyncCuratorFrameworkDslwith(WatchMode mode)Returns a facade that changes how watchers are set whenAsyncCuratorFrameworkDsl.watched()is calledAsyncCuratorFrameworkDslwith(WatchMode mode, org.apache.curator.framework.api.UnhandledErrorListener listener, java.util.function.UnaryOperator<org.apache.curator.framework.api.CuratorEvent> resultFilter, java.util.function.UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter)Set any combination of listener, filters or watch modestatic AsyncCuratorFrameworkwrap(org.apache.curator.framework.CuratorFramework client)Takes an old-style Curator instance and returns a new async instance that wraps it.-
Methods inherited from interface org.apache.curator.x.async.api.AsyncCuratorFrameworkDsl
addWatch, create, delete, getACL, reconfig, removeWatches, setACL, setData, sync, transaction, transactionOp, watched
-
Methods inherited from interface org.apache.curator.x.async.api.WatchableAsyncCuratorFramework
checkExists, getChildren, getConfig, getData
-
-
-
-
Method Detail
-
wrap
static AsyncCuratorFramework wrap(org.apache.curator.framework.CuratorFramework client)
Takes an old-style Curator instance and returns a new async instance that wraps it. Note: the instance must have been created through a chain that leads back toCuratorFrameworkFactory. i.e. you can have derived instances such asWatcherRemoveCuratorFrameworketc. but the original client must have been created by the Factory.- Parameters:
client- instance to wrap- Returns:
- wrapped instance
-
unwrap
org.apache.curator.framework.CuratorFramework unwrap()
Returns the client that was originally passed towrap(org.apache.curator.framework.CuratorFramework)- Returns:
- original client
-
with
AsyncCuratorFrameworkDsl with(WatchMode mode)
Returns a facade that changes how watchers are set whenAsyncCuratorFrameworkDsl.watched()is called- Parameters:
mode- watch mode to use for subsequent calls toAsyncCuratorFrameworkDsl.watched()- Returns:
- facade
-
with
AsyncCuratorFrameworkDsl with(org.apache.curator.framework.api.UnhandledErrorListener listener)
Returns a facade that adds the given UnhandledErrorListener to all background operations- Parameters:
listener- lister to use- Returns:
- facade
-
with
AsyncCuratorFrameworkDsl with(java.util.function.UnaryOperator<org.apache.curator.framework.api.CuratorEvent> resultFilter, java.util.function.UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter)
Returns a facade that adds the the given filters to all background operations and watchers.resultFilterwill get called for every background callback.watcherFilterwill get called for every watcher. The filters can return new versions or unchanged versions of the arguments.- Parameters:
resultFilter- filter to use ornullwatcherFilter- filter to use ornull- Returns:
- facade
-
with
AsyncCuratorFrameworkDsl with(org.apache.curator.framework.api.UnhandledErrorListener listener, java.util.function.UnaryOperator<org.apache.curator.framework.api.CuratorEvent> resultFilter, java.util.function.UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter)
Set any combination of listener or filters- Parameters:
listener- lister to use ornullresultFilter- filter to use ornullwatcherFilter- filter to use ornull- Returns:
- facade
- See Also:
with(java.util.function.UnaryOperator, java.util.function.UnaryOperator),with(org.apache.curator.framework.api.UnhandledErrorListener)
-
with
AsyncCuratorFrameworkDsl with(WatchMode mode, org.apache.curator.framework.api.UnhandledErrorListener listener, java.util.function.UnaryOperator<org.apache.curator.framework.api.CuratorEvent> resultFilter, java.util.function.UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter)
Set any combination of listener, filters or watch mode- Parameters:
mode- watch mode to use for subsequent calls toAsyncCuratorFrameworkDsl.watched()(cannot benull)listener- lister to use ornullresultFilter- filter to use ornullwatcherFilter- filter to use ornull- Returns:
- facade
- See Also:
with(WatchMode),with(java.util.function.UnaryOperator, java.util.function.UnaryOperator),with(org.apache.curator.framework.api.UnhandledErrorListener)
-
-