public abstract class CuratorFrameworkBase extends Object implements CuratorFramework
CuratorFrameworks, it is public for private usages (a.k.a. impls/details package).
Most internal codes should use CuratorFrameworkBase instead of CuratorFrameworkImpl, so
functionalities could be added additively by overriding methods in DelegatingCuratorFramework.
An instance of CuratorFramework MUST BE an instance of CuratorFrameworkBase.
| Constructor and Description |
|---|
CuratorFrameworkBase() |
| Modifier and Type | Method and Description |
|---|---|
ExistsBuilder |
checkExists()
Start an exists builder
|
protected void |
checkState() |
abstract CuratorFramework |
client()
Return the underlying client which is the one constructed from
CuratorFrameworkFactory. |
CreateBuilder |
create()
Start a create builder
|
void |
createContainers(String path)
Create all nodes in the specified path as containers if they don't
already exist
|
DeleteBuilder |
delete()
Start a delete builder
|
GetACLBuilder |
getACL()
Start a get ACL builder
|
GetChildrenBuilder |
getChildren()
Start a get children builder
|
GetConfigBuilder |
getConfig()
Start a getConfig builder
|
GetDataBuilder |
getData()
Start a get data builder
|
String |
getNamespace()
Return the current namespace or "" if none
|
protected void |
internalSync(CuratorFrameworkBase impl,
String path,
Object context) |
CuratorTransaction |
inTransaction()
Start a transaction builder
|
org.apache.curator.utils.EnsurePath |
newNamespaceAwareEnsurePath(String path)
Deprecated.
|
WatcherRemoveCuratorFramework |
newWatcherRemoveCuratorFramework()
Returns a facade of the current instance that tracks
watchers created and allows a one-shot removal of all watchers
via
WatcherRemoveCuratorFramework.removeWatchers() |
CuratorFramework |
nonNamespaceView()
Returns a facade of the current instance that does _not_ automatically
pre-pend the namespace to all paths
|
ReconfigBuilder |
reconfig()
Start a reconfig builder
|
SetACLBuilder |
setACL()
Start a set ACL builder
|
SetDataBuilder |
setData()
Start a set data builder
|
SyncBuilder |
sync()
Start a sync builder.
|
void |
sync(String path,
Object context)
Perform a sync on the given path - syncs are always in the background
|
CuratorMultiTransaction |
transaction()
Start a transaction builder
|
TransactionOp |
transactionOp()
Allocate an operation that can be used with
CuratorFramework.transaction(). |
WatchesBuilder |
watchers()
Start a watch builder.
|
RemoveWatchesBuilder |
watches()
Start a remove watches builder.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitblockUntilConnected, blockUntilConnected, clearWatcherReferences, close, compressionEnabled, getConnectionStateErrorPolicy, getConnectionStateListenable, getCuratorListenable, getCurrentConfig, getSchemaSet, getState, getUnhandledErrorListenable, getZookeeperClient, getZookeeperCompatibility, isStarted, postSafeNotify, runSafe, start, usingNamespacepublic abstract CuratorFramework client()
CuratorFrameworkFactory.public final CuratorFramework nonNamespaceView()
CuratorFrameworknonNamespaceView in interface CuratorFrameworkpublic final String getNamespace()
CuratorFrameworkgetNamespace in interface CuratorFramework@Deprecated public org.apache.curator.utils.EnsurePath newNamespaceAwareEnsurePath(String path)
CuratorFrameworknewNamespaceAwareEnsurePath in interface CuratorFrameworkpath - path to ensureprotected final void checkState()
protected final void internalSync(CuratorFrameworkBase impl, String path, Object context)
public CreateBuilder create()
CuratorFrameworkcreate in interface CuratorFrameworkpublic DeleteBuilder delete()
CuratorFrameworkdelete in interface CuratorFrameworkpublic ExistsBuilder checkExists()
CuratorFrameworkThe 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.
checkExists in interface CuratorFrameworkpublic GetDataBuilder getData()
CuratorFrameworkgetData in interface CuratorFrameworkpublic SetDataBuilder setData()
CuratorFrameworksetData in interface CuratorFrameworkpublic GetChildrenBuilder getChildren()
CuratorFrameworkgetChildren in interface CuratorFrameworkpublic GetACLBuilder getACL()
CuratorFrameworkgetACL in interface CuratorFrameworkpublic SetACLBuilder setACL()
CuratorFrameworksetACL in interface CuratorFrameworkpublic ReconfigBuilder reconfig()
CuratorFrameworkreconfig in interface CuratorFrameworkpublic GetConfigBuilder getConfig()
CuratorFrameworkgetConfig in interface CuratorFrameworkpublic CuratorTransaction inTransaction()
CuratorFrameworkinTransaction in interface CuratorFrameworkpublic CuratorMultiTransaction transaction()
CuratorFrameworktransaction in interface CuratorFrameworkpublic TransactionOp transactionOp()
CuratorFrameworkCuratorFramework.transaction().
NOTE: CuratorOp instances created by this builder are
reusable.transactionOp in interface CuratorFrameworkpublic void sync(String path, Object context)
CuratorFrameworksync in interface CuratorFrameworkpath - the pathcontext - optional contextpublic SyncBuilder sync()
CuratorFrameworksync in interface CuratorFrameworkpublic final RemoveWatchesBuilder watches()
CuratorFrameworkwatches in interface CuratorFrameworkpublic final WatchesBuilder watchers()
CuratorFrameworkIllegalStateException for ZooKeeper JAR 3.5 or belowwatchers in interface CuratorFrameworkpublic final void createContainers(String path) throws Exception
CuratorFrameworkcreateContainers in interface CuratorFrameworkpath - path to createException - errorspublic final WatcherRemoveCuratorFramework newWatcherRemoveCuratorFramework()
CuratorFrameworkWatcherRemoveCuratorFramework.removeWatchers()newWatcherRemoveCuratorFramework in interface CuratorFrameworkCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.