Class AsyncCuratorFrameworkImpl
java.lang.Object
org.apache.curator.x.async.details.AsyncCuratorFrameworkImpl
- All Implemented Interfaces:
AsyncCuratorFrameworkDsl
,WatchableAsyncCuratorFramework
,AsyncCuratorFramework
-
Constructor Summary
ConstructorDescriptionAsyncCuratorFrameworkImpl
(CuratorFrameworkImpl client, Filters filters, WatchMode watchMode, boolean watched) -
Method Summary
Modifier and TypeMethodDescriptionaddWatch()
Start an add watch builder.Start an exists builder.create()
Start a create builderdelete()
Start a delete buildergetACL()
Start a get ACL builderStart a get children builderStart a getConfig buildergetData()
Start a get data builderreconfig()
Start a reconfig builderStart a remove watches buildersetACL()
Start a set ACL buildersetData()
Start a set data buildersync()
Start a sync builderStart a transaction builderAllocate an operation that can be used withAsyncCuratorFrameworkDsl.transaction()
.unwrap()
Returns the client that was originally passed toAsyncCuratorFramework.wrap(org.apache.curator.framework.CuratorFramework)
watched()
Returns a facade that adds watching to any of the subsequently created builders.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 mode
-
Constructor Details
-
AsyncCuratorFrameworkImpl
-
AsyncCuratorFrameworkImpl
public AsyncCuratorFrameworkImpl(CuratorFrameworkImpl client, Filters filters, WatchMode watchMode, boolean watched)
-
-
Method Details
-
create
Description copied from interface:AsyncCuratorFrameworkDsl
Start a create builder- Specified by:
create
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
delete
Description copied from interface:AsyncCuratorFrameworkDsl
Start a delete builder- Specified by:
delete
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
setData
Description copied from interface:AsyncCuratorFrameworkDsl
Start a set data builder- Specified by:
setData
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
getACL
Description copied from interface:AsyncCuratorFrameworkDsl
Start a get ACL builder- Specified by:
getACL
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
setACL
Description copied from interface:AsyncCuratorFrameworkDsl
Start a set ACL builder- Specified by:
setACL
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
reconfig
Description copied from interface:AsyncCuratorFrameworkDsl
Start a reconfig builder- Specified by:
reconfig
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
transaction
Description copied from interface:AsyncCuratorFrameworkDsl
Start a transaction builder- Specified by:
transaction
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
sync
Description copied from interface:AsyncCuratorFrameworkDsl
Start a sync builder- Specified by:
sync
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
removeWatches
Description copied from interface:AsyncCuratorFrameworkDsl
Start a remove watches builder- Specified by:
removeWatches
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
addWatch
Description copied from interface:AsyncCuratorFrameworkDsl
Start an add watch builder. Supported only when ZooKeeper JAR of version 3.6 or above is used, throwsIllegalStateException
for ZooKeeper JAR 3.5 or below- Specified by:
addWatch
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- builder object
-
unwrap
Description copied from interface:AsyncCuratorFramework
Returns the client that was originally passed toAsyncCuratorFramework.wrap(org.apache.curator.framework.CuratorFramework)
- Specified by:
unwrap
in interfaceAsyncCuratorFramework
- Returns:
- original client
-
watched
Description copied from interface:AsyncCuratorFrameworkDsl
Returns a facade that adds watching to any of the subsequently created builders. i.e. all operations on the WatchableAsyncCuratorFramework facade will have watchers set. Also, the
AsyncStage
returned from these builders will have a loaded staged watcher that is accessed fromAsyncStage.event()
WatchMode.stateChangeAndSuccess
is used- Specified by:
watched
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- watcher facade
-
with
Description copied from interface:AsyncCuratorFramework
Returns a facade that changes how watchers are set whenAsyncCuratorFrameworkDsl.watched()
is called- Specified by:
with
in interfaceAsyncCuratorFramework
- Parameters:
mode
- watch mode to use for subsequent calls toAsyncCuratorFrameworkDsl.watched()
- Returns:
- facade
-
with
public AsyncCuratorFrameworkDsl with(WatchMode mode, UnhandledErrorListener listener, UnaryOperator<CuratorEvent> resultFilter, UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter) Description copied from interface:AsyncCuratorFramework
Set any combination of listener, filters or watch mode- Specified by:
with
in interfaceAsyncCuratorFramework
- 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:
-
with
Description copied from interface:AsyncCuratorFramework
Returns a facade that adds the given UnhandledErrorListener to all background operations- Specified by:
with
in interfaceAsyncCuratorFramework
- Parameters:
listener
- lister to use- Returns:
- facade
-
with
public AsyncCuratorFrameworkDsl with(UnaryOperator<CuratorEvent> resultFilter, UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter) Description copied from interface:AsyncCuratorFramework
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.- Specified by:
with
in interfaceAsyncCuratorFramework
- Parameters:
resultFilter
- filter to use ornull
watcherFilter
- filter to use ornull
- Returns:
- facade
-
with
public AsyncCuratorFrameworkDsl with(UnhandledErrorListener listener, UnaryOperator<CuratorEvent> resultFilter, UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter) Description copied from interface:AsyncCuratorFramework
Set any combination of listener or filters- Specified by:
with
in interfaceAsyncCuratorFramework
- Parameters:
listener
- lister to use ornull
resultFilter
- filter to use ornull
watcherFilter
- filter to use ornull
- Returns:
- facade
- See Also:
-
transactionOp
Description copied from interface:AsyncCuratorFrameworkDsl
Allocate an operation that can be used withAsyncCuratorFrameworkDsl.transaction()
. NOTE:CuratorOp
instances created by this builder are reusable.- Specified by:
transactionOp
in interfaceAsyncCuratorFrameworkDsl
- Returns:
- operation builder
-
checkExists
Description copied from interface:WatchableAsyncCuratorFramework
Start an exists builder. The builder will return a Stat object as if org.apache.zookeeper.ZooKeeper.exists() were called. Thus, a null means that it does not exist and an actual Stat object means it does exist.- Specified by:
checkExists
in interfaceWatchableAsyncCuratorFramework
- Returns:
- builder object
-
getData
Description copied from interface:WatchableAsyncCuratorFramework
Start a get data builder- Specified by:
getData
in interfaceWatchableAsyncCuratorFramework
- Returns:
- builder object
-
getChildren
Description copied from interface:WatchableAsyncCuratorFramework
Start a get children builder- Specified by:
getChildren
in interfaceWatchableAsyncCuratorFramework
- Returns:
- builder object
-
getConfig
Description copied from interface:WatchableAsyncCuratorFramework
Start a getConfig builder- Specified by:
getConfig
in interfaceWatchableAsyncCuratorFramework
- Returns:
- builder object
-