Package org.apache.curator.x.async
Interface AsyncCuratorFramework
- All Superinterfaces:
AsyncCuratorFrameworkDsl
,WatchableAsyncCuratorFramework
- All Known Implementing Classes:
AsyncCuratorFrameworkImpl
Zookeeper framework-style client that returns composable async operations
that implement
CompletionStage
-
Method Summary
Modifier and TypeMethodDescriptionunwrap()
Returns the client that was originally passed towrap(org.apache.curator.framework.CuratorFramework)
with
(UnaryOperator<CuratorEvent> resultFilter, UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter) Returns a facade that adds the the given filters to all background operations and watchers.with
(UnhandledErrorListener listener) Returns a facade that adds the given UnhandledErrorListener to all background operationswith
(UnhandledErrorListener listener, UnaryOperator<CuratorEvent> resultFilter, UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter) Set any combination of listener or filtersReturns a facade that changes how watchers are set whenAsyncCuratorFrameworkDsl.watched()
is calledwith
(WatchMode mode, UnhandledErrorListener listener, UnaryOperator<CuratorEvent> resultFilter, UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter) Set any combination of listener, filters or watch modestatic AsyncCuratorFramework
wrap
(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 Details
-
wrap
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 asWatcherRemoveCuratorFramework
etc. but the original client must have been created by the Factory.- Parameters:
client
- instance to wrap- Returns:
- wrapped instance
-
unwrap
CuratorFramework unwrap()Returns the client that was originally passed towrap(org.apache.curator.framework.CuratorFramework)
- Returns:
- original client
-
with
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
Returns a facade that adds the given UnhandledErrorListener to all background operations- Parameters:
listener
- lister to use- Returns:
- facade
-
with
AsyncCuratorFrameworkDsl with(UnaryOperator<CuratorEvent> resultFilter, UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter) Returns a facade that adds the the given filters to all background operations and watchers.resultFilter
will get called for every background callback.watcherFilter
will get called for every watcher. The filters can return new versions or unchanged versions of the arguments.- Parameters:
resultFilter
- filter to use ornull
watcherFilter
- filter to use ornull
- Returns:
- facade
-
with
AsyncCuratorFrameworkDsl with(UnhandledErrorListener listener, UnaryOperator<CuratorEvent> resultFilter, UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter) Set any combination of listener or filters- Parameters:
listener
- lister to use ornull
resultFilter
- filter to use ornull
watcherFilter
- filter to use ornull
- Returns:
- facade
- See Also:
-
with
AsyncCuratorFrameworkDsl with(WatchMode mode, UnhandledErrorListener listener, UnaryOperator<CuratorEvent> resultFilter, 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 ornull
resultFilter
- filter to use ornull
watcherFilter
- filter to use ornull
- Returns:
- facade
- See Also:
-