public interface CuratorFramework extends Closeable
| Modifier and Type | Method and Description |
|---|---|
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
|
DeleteBuilder |
delete()
Start a delete builder
|
GetACLBuilder |
getACL()
Start a get ACL builder
|
GetChildrenBuilder |
getChildren()
Start a get children builder
|
Listenable<ConnectionStateListener> |
getConnectionStateListenable()
Returns the listenable interface for the Connect State
|
Listenable<CuratorListener> |
getCuratorListenable()
Returns the listenable interface for events
|
GetDataBuilder |
getData()
Start a get data builder
|
String |
getNamespace()
Return the current namespace or "" if none
|
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
|
CuratorTransaction |
inTransaction()
Start a transaction builder
|
boolean |
isStarted()
Deprecated.
use
getState() instead |
org.apache.curator.utils.EnsurePath |
newNamespaceAwareEnsurePath(String path)
Allocates an ensure path instance that is namespace aware
|
CuratorFramework |
nonNamespaceView()
Deprecated.
use
usingNamespace(java.lang.String) passing null |
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(String path,
Object backgroundContextObject)
Deprecated.
use
sync() instead |
CuratorFramework |
usingNamespace(String newNamespace)
Returns a facade of the current instance that uses the specified namespace
or no namespace if
newNamespace is null. |
void start()
void close()
close in interface AutoCloseableclose in interface CloseableCuratorFrameworkState getState()
boolean isStarted()
getState() insteadCreateBuilder create()
DeleteBuilder delete()
ExistsBuilder checkExists()
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.
GetDataBuilder getData()
SetDataBuilder setData()
GetChildrenBuilder getChildren()
GetACLBuilder getACL()
SetACLBuilder setACL()
CuratorTransaction inTransaction()
void sync(String path, Object backgroundContextObject)
sync() insteadpath - the pathbackgroundContextObject - optional contextSyncBuilder sync()
Listenable<ConnectionStateListener> getConnectionStateListenable()
Listenable<CuratorListener> getCuratorListenable()
Listenable<UnhandledErrorListener> getUnhandledErrorListenable()
CuratorFramework nonNamespaceView()
CuratorFramework usingNamespace(String newNamespace)
newNamespace is null.newNamespace - the new namespace or null for noneString getNamespace()
org.apache.curator.CuratorZookeeperClient getZookeeperClient()
org.apache.curator.utils.EnsurePath newNamespaceAwareEnsurePath(String path)
path - path to ensurevoid clearWatcherReferences(org.apache.zookeeper.Watcher watcher)
watcher - the watcherCopyright © 2011–2014 The Apache Software Foundation. All rights reserved.