public interface CuratorFramework extends Closeable
Modifier and Type | Method and Description |
---|---|
ExistsBuilder |
checkExists()
Start an exists builder
The builder will return a Stat object as if org.apache.zookeeper.ZooKeeper.exists() were called.
|
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
|
CuratorZookeeperClient |
getZookeeperClient()
Return the managed zookeeper client
|
CuratorTransaction |
inTransaction()
Start a transaction builder
|
boolean |
isStarted()
Deprecated.
use
getState() instead |
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 AutoCloseable
close
in interface Closeable
CuratorFrameworkState getState()
boolean isStarted()
getState()
insteadCreateBuilder create()
DeleteBuilder delete()
ExistsBuilder checkExists()
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()
usingNamespace(java.lang.String)
passing null
CuratorFramework usingNamespace(String newNamespace)
newNamespace
is null
.newNamespace
- the new namespace or null for noneString getNamespace()
CuratorZookeeperClient getZookeeperClient()
EnsurePath newNamespaceAwareEnsurePath(String path)
path
- path to ensureCopyright © 2011–2014 The Apache Software Foundation. All rights reserved.