Class AsyncCuratorFrameworkImpl
- java.lang.Object
-
- org.apache.curator.x.async.details.AsyncCuratorFrameworkImpl
-
- All Implemented Interfaces:
AsyncCuratorFrameworkDsl,WatchableAsyncCuratorFramework,AsyncCuratorFramework
public class AsyncCuratorFrameworkImpl extends java.lang.Object implements AsyncCuratorFramework
-
-
Constructor Summary
Constructors Constructor Description AsyncCuratorFrameworkImpl(org.apache.curator.framework.CuratorFramework client)AsyncCuratorFrameworkImpl(org.apache.curator.framework.imps.CuratorFrameworkImpl client, Filters filters, WatchMode watchMode, boolean watched)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncWatchBuilderaddWatch()Start an add watch builder.AsyncExistsBuildercheckExists()Start an exists builder.AsyncCreateBuildercreate()Start a create builderAsyncDeleteBuilderdelete()Start a delete builderAsyncGetACLBuildergetACL()Start a get ACL builderAsyncGetChildrenBuildergetChildren()Start a get children builderAsyncGetConfigBuildergetConfig()Start a getConfig builderAsyncGetDataBuildergetData()Start a get data builderAsyncReconfigBuilderreconfig()Start a reconfig builderAsyncRemoveWatchesBuilderremoveWatches()Start a remove watches builderAsyncSetACLBuildersetACL()Start a set ACL builderAsyncSetDataBuildersetData()Start a set data builderAsyncSyncBuildersync()Start a sync builderAsyncMultiTransactiontransaction()Start a transaction builderAsyncTransactionOptransactionOp()Allocate an operation that can be used withAsyncCuratorFrameworkDsl.transaction().org.apache.curator.framework.CuratorFrameworkunwrap()Returns the client that was originally passed toAsyncCuratorFramework.wrap(org.apache.curator.framework.CuratorFramework)WatchableAsyncCuratorFrameworkwatched()Returns a facade that adds watching to any of the subsequently created builders.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 mode
-
-
-
Method Detail
-
create
public AsyncCreateBuilder create()
Description copied from interface:AsyncCuratorFrameworkDslStart a create builder- Specified by:
createin interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
delete
public AsyncDeleteBuilder delete()
Description copied from interface:AsyncCuratorFrameworkDslStart a delete builder- Specified by:
deletein interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
setData
public AsyncSetDataBuilder setData()
Description copied from interface:AsyncCuratorFrameworkDslStart a set data builder- Specified by:
setDatain interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
getACL
public AsyncGetACLBuilder getACL()
Description copied from interface:AsyncCuratorFrameworkDslStart a get ACL builder- Specified by:
getACLin interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
setACL
public AsyncSetACLBuilder setACL()
Description copied from interface:AsyncCuratorFrameworkDslStart a set ACL builder- Specified by:
setACLin interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
reconfig
public AsyncReconfigBuilder reconfig()
Description copied from interface:AsyncCuratorFrameworkDslStart a reconfig builder- Specified by:
reconfigin interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
transaction
public AsyncMultiTransaction transaction()
Description copied from interface:AsyncCuratorFrameworkDslStart a transaction builder- Specified by:
transactionin interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
sync
public AsyncSyncBuilder sync()
Description copied from interface:AsyncCuratorFrameworkDslStart a sync builder- Specified by:
syncin interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
removeWatches
public AsyncRemoveWatchesBuilder removeWatches()
Description copied from interface:AsyncCuratorFrameworkDslStart a remove watches builder- Specified by:
removeWatchesin interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
addWatch
public AsyncWatchBuilder addWatch()
Description copied from interface:AsyncCuratorFrameworkDslStart an add watch builder. Supported only when ZooKeeper JAR of version 3.6 or above is used, throwsIllegalStateExceptionfor ZooKeeper JAR 3.5 or below- Specified by:
addWatchin interfaceAsyncCuratorFrameworkDsl- Returns:
- builder object
-
unwrap
public org.apache.curator.framework.CuratorFramework unwrap()
Description copied from interface:AsyncCuratorFrameworkReturns the client that was originally passed toAsyncCuratorFramework.wrap(org.apache.curator.framework.CuratorFramework)- Specified by:
unwrapin interfaceAsyncCuratorFramework- Returns:
- original client
-
watched
public WatchableAsyncCuratorFramework watched()
Description copied from interface:AsyncCuratorFrameworkDslReturns 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
AsyncStagereturned from these builders will have a loaded staged watcher that is accessed fromAsyncStage.event()WatchMode.stateChangeAndSuccessis used- Specified by:
watchedin interfaceAsyncCuratorFrameworkDsl- Returns:
- watcher facade
-
with
public AsyncCuratorFrameworkDsl with(WatchMode mode)
Description copied from interface:AsyncCuratorFrameworkReturns a facade that changes how watchers are set whenAsyncCuratorFrameworkDsl.watched()is called- Specified by:
within interfaceAsyncCuratorFramework- Parameters:
mode- watch mode to use for subsequent calls toAsyncCuratorFrameworkDsl.watched()- Returns:
- facade
-
with
public 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)
Description copied from interface:AsyncCuratorFrameworkSet any combination of listener, filters or watch mode- Specified by:
within interfaceAsyncCuratorFramework- 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:
AsyncCuratorFramework.with(WatchMode),AsyncCuratorFramework.with(java.util.function.UnaryOperator, java.util.function.UnaryOperator),AsyncCuratorFramework.with(org.apache.curator.framework.api.UnhandledErrorListener)
-
with
public AsyncCuratorFrameworkDsl with(org.apache.curator.framework.api.UnhandledErrorListener listener)
Description copied from interface:AsyncCuratorFrameworkReturns a facade that adds the given UnhandledErrorListener to all background operations- Specified by:
within interfaceAsyncCuratorFramework- Parameters:
listener- lister to use- Returns:
- facade
-
with
public AsyncCuratorFrameworkDsl with(java.util.function.UnaryOperator<org.apache.curator.framework.api.CuratorEvent> resultFilter, java.util.function.UnaryOperator<org.apache.zookeeper.WatchedEvent> watcherFilter)
Description copied from interface:AsyncCuratorFrameworkReturns 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.- Specified by:
within interfaceAsyncCuratorFramework- Parameters:
resultFilter- filter to use ornullwatcherFilter- filter to use ornull- Returns:
- facade
-
with
public 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)
Description copied from interface:AsyncCuratorFrameworkSet any combination of listener or filters- Specified by:
within interfaceAsyncCuratorFramework- Parameters:
listener- lister to use ornullresultFilter- filter to use ornullwatcherFilter- filter to use ornull- Returns:
- facade
- See Also:
AsyncCuratorFramework.with(java.util.function.UnaryOperator, java.util.function.UnaryOperator),AsyncCuratorFramework.with(org.apache.curator.framework.api.UnhandledErrorListener)
-
transactionOp
public AsyncTransactionOp transactionOp()
Description copied from interface:AsyncCuratorFrameworkDslAllocate an operation that can be used withAsyncCuratorFrameworkDsl.transaction(). NOTE:CuratorOpinstances created by this builder are reusable.- Specified by:
transactionOpin interfaceAsyncCuratorFrameworkDsl- Returns:
- operation builder
-
checkExists
public AsyncExistsBuilder checkExists()
Description copied from interface:WatchableAsyncCuratorFrameworkStart 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:
checkExistsin interfaceWatchableAsyncCuratorFramework- Returns:
- builder object
-
getData
public AsyncGetDataBuilder getData()
Description copied from interface:WatchableAsyncCuratorFrameworkStart a get data builder- Specified by:
getDatain interfaceWatchableAsyncCuratorFramework- Returns:
- builder object
-
getChildren
public AsyncGetChildrenBuilder getChildren()
Description copied from interface:WatchableAsyncCuratorFrameworkStart a get children builder- Specified by:
getChildrenin interfaceWatchableAsyncCuratorFramework- Returns:
- builder object
-
getConfig
public AsyncGetConfigBuilder getConfig()
Description copied from interface:WatchableAsyncCuratorFrameworkStart a getConfig builder- Specified by:
getConfigin interfaceWatchableAsyncCuratorFramework- Returns:
- builder object
-
-