java.io.Closeable, java.lang.AutoCloseable, CuratorFrameworkpublic class CuratorFrameworkImpl extends java.lang.Object implements CuratorFramework
| Modifier and Type | Field | Description |
|---|---|---|
UnhandledErrorListener |
debugUnhandledErrorListener |
| Modifier | Constructor | Description |
|---|---|---|
|
CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder) |
|
protected |
CuratorFrameworkImpl(CuratorFrameworkImpl parent) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
blockUntilConnected() |
Block until a connection to ZooKeeper is available.
|
boolean |
blockUntilConnected(int maxWaitTime,
java.util.concurrent.TimeUnit units) |
Block until a connection to ZooKeeper is available or the maxWaitTime has been exceeded
|
ExistsBuilder |
checkExists() |
Start an exists builder
|
void |
clearWatcherReferences(org.apache.zookeeper.Watcher watcher) |
Curator can hold internal references to watchers that may inhibit garbage collection.
|
void |
close() |
Stop the client
|
CreateBuilder |
create() |
Start a create builder
|
void |
createContainers(java.lang.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
|
ConnectionStateErrorPolicy |
getConnectionStateErrorPolicy() |
Return the configured error policy
|
Listenable<ConnectionStateListener> |
getConnectionStateListenable() |
Returns the listenable interface for the Connect State
|
Listenable<CuratorListener> |
getCuratorListenable() |
Returns the listenable interface for events
|
org.apache.zookeeper.server.quorum.flexible.QuorumVerifier |
getCurrentConfig() |
Current maintains a cached view of the Zookeeper quorum config.
|
GetDataBuilder |
getData() |
Start a get data builder
|
java.lang.String |
getNamespace() |
Return the current namespace or "" if none
|
SchemaSet |
getSchemaSet() |
Return this instance's schema set
|
CuratorFrameworkState |
getState() |
Returns the state of this instance
|
Listenable<UnhandledErrorListener> |
getUnhandledErrorListenable() |
Returns the listenable interface for unhandled errors
|
org.apache.curator.CuratorZookeeperClient |
getZookeeperClient() |
Return the managed zookeeper client
|
protected void |
internalSync(CuratorFrameworkImpl impl,
java.lang.String path,
java.lang.Object context) |
|
CuratorTransaction |
inTransaction() |
Start a transaction builder
|
boolean |
isStarted() |
Deprecated.
|
boolean |
isZk34CompatibilityMode() |
Return true if this instance is running in ZK 3.4.x compatibility mode
|
org.apache.curator.utils.EnsurePath |
newNamespaceAwareEnsurePath(java.lang.String path) |
Allocates an ensure path instance that is namespace aware
|
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() |
Deprecated.
|
ReconfigBuilder |
reconfig() |
Start a reconfig builder
|
SetACLBuilder |
setACL() |
Start a set ACL builder
|
SetDataBuilder |
setData() |
Start a set data builder
|
void |
start() |
Start the client.
|
SyncBuilder |
sync() |
Start a sync builder.
|
void |
sync(java.lang.String path,
java.lang.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(). |
CuratorFramework |
usingNamespace(java.lang.String newNamespace) |
Returns a facade of the current instance that uses the specified namespace
or no namespace if
newNamespace is null. |
RemoveWatchesBuilder |
watches() |
Start a remove watches builder.
|
public volatile UnhandledErrorListener debugUnhandledErrorListener
public CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder)
protected CuratorFrameworkImpl(CuratorFrameworkImpl parent)
public WatcherRemoveCuratorFramework newWatcherRemoveCuratorFramework()
CuratorFrameworkWatcherRemoveCuratorFramework.removeWatchers()newWatcherRemoveCuratorFramework in interface CuratorFrameworkpublic org.apache.zookeeper.server.quorum.flexible.QuorumVerifier getCurrentConfig()
CuratorFrameworkgetCurrentConfig in interface CuratorFrameworkpublic void createContainers(java.lang.String path)
throws java.lang.Exception
CuratorFrameworkcreateContainers in interface CuratorFrameworkpath - path to createjava.lang.Exception - errorspublic void clearWatcherReferences(org.apache.zookeeper.Watcher watcher)
CuratorFrameworkclearWatcherReferences in interface CuratorFrameworkwatcher - the watcherpublic CuratorFrameworkState getState()
CuratorFrameworkgetState in interface CuratorFramework@Deprecated public boolean isStarted()
CuratorFrameworkisStarted in interface CuratorFrameworkpublic boolean blockUntilConnected(int maxWaitTime,
java.util.concurrent.TimeUnit units)
throws java.lang.InterruptedException
CuratorFrameworkblockUntilConnected in interface CuratorFrameworkmaxWaitTime - The maximum wait time. Specify a value <= 0 to wait indefinitelyunits - The time units for the maximum wait time.java.lang.InterruptedException - If interrupted while waitingpublic void blockUntilConnected()
throws java.lang.InterruptedException
CuratorFrameworkblockUntilConnected in interface CuratorFrameworkjava.lang.InterruptedException - If interrupted while waitingpublic ConnectionStateErrorPolicy getConnectionStateErrorPolicy()
CuratorFrameworkgetConnectionStateErrorPolicy in interface CuratorFrameworkpublic void start()
CuratorFrameworkstart in interface CuratorFrameworkpublic void close()
CuratorFrameworkclose in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in interface CuratorFramework@Deprecated public CuratorFramework nonNamespaceView()
CuratorFrameworknonNamespaceView in interface CuratorFrameworkpublic java.lang.String getNamespace()
CuratorFrameworkgetNamespace in interface CuratorFrameworkpublic CuratorFramework usingNamespace(java.lang.String newNamespace)
CuratorFrameworknewNamespace is null.usingNamespace in interface CuratorFrameworknewNamespace - the new namespace or null for nonepublic 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 Listenable<ConnectionStateListener> getConnectionStateListenable()
CuratorFrameworkgetConnectionStateListenable in interface CuratorFrameworkpublic Listenable<CuratorListener> getCuratorListenable()
CuratorFrameworkgetCuratorListenable in interface CuratorFrameworkpublic Listenable<UnhandledErrorListener> getUnhandledErrorListenable()
CuratorFrameworkgetUnhandledErrorListenable in interface CuratorFrameworkpublic void sync(java.lang.String path,
java.lang.Object context)
CuratorFrameworksync in interface CuratorFrameworkpath - the pathcontext - optional contextpublic SyncBuilder sync()
CuratorFrameworksync in interface CuratorFrameworkpublic RemoveWatchesBuilder watches()
CuratorFrameworkwatches in interface CuratorFrameworkprotected void internalSync(CuratorFrameworkImpl impl, java.lang.String path, java.lang.Object context)
public org.apache.curator.CuratorZookeeperClient getZookeeperClient()
CuratorFrameworkgetZookeeperClient in interface CuratorFrameworkpublic org.apache.curator.utils.EnsurePath newNamespaceAwareEnsurePath(java.lang.String path)
CuratorFrameworknewNamespaceAwareEnsurePath in interface CuratorFrameworkpath - path to ensurepublic SchemaSet getSchemaSet()
CuratorFrameworkgetSchemaSet in interface CuratorFrameworkpublic boolean isZk34CompatibilityMode()
CuratorFrameworkisZk34CompatibilityMode in interface CuratorFrameworkCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.