public class CuratorFrameworkImpl extends Object implements CuratorFramework
| Modifier | Constructor and Description |
|---|---|
|
CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder) |
protected |
CuratorFrameworkImpl(CuratorFrameworkImpl parent) |
| 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
|
org.apache.curator.CuratorZookeeperClient |
getZookeeperClient()
Return the managed zookeeper client
|
protected void |
internalSync(CuratorFrameworkImpl impl,
String path,
Object context) |
CuratorTransaction |
inTransaction()
Start a transaction builder
|
boolean |
isStarted()
Return true if the client is started, not closed, etc.
|
org.apache.curator.utils.EnsurePath |
newNamespaceAwareEnsurePath(String path)
Allocates an ensure path instance that is namespace aware
|
CuratorFramework |
nonNamespaceView()
Returns a facade of the current instance that does _not_ automatically
pre-pend the namespace to all paths
|
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 context)
Perform a sync on the given path - syncs are always in the background
|
CuratorFramework |
usingNamespace(String newNamespace)
Returns a facade of the current instance that uses the specified namespace
or no namespace if
newNamespace is null. |
public CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder)
protected CuratorFrameworkImpl(CuratorFrameworkImpl parent)
public CuratorFrameworkState getState()
CuratorFrameworkgetState in interface CuratorFrameworkpublic boolean isStarted()
CuratorFrameworkisStarted in interface CuratorFrameworkpublic void start()
CuratorFrameworkstart in interface CuratorFrameworkpublic void close()
CuratorFrameworkclose in interface Closeableclose in interface AutoCloseableclose in interface CuratorFrameworkpublic CuratorFramework nonNamespaceView()
CuratorFrameworknonNamespaceView in interface CuratorFrameworkpublic String getNamespace()
CuratorFrameworkgetNamespace in interface CuratorFrameworkpublic CuratorFramework usingNamespace(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()
CuratorFrameworkcheckExists 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 CuratorTransaction inTransaction()
CuratorFrameworkinTransaction 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(String path, Object context)
CuratorFrameworksync in interface CuratorFrameworkpath - the pathcontext - optional contextpublic SyncBuilder sync()
CuratorFrameworksync in interface CuratorFrameworkprotected void internalSync(CuratorFrameworkImpl impl, String path, Object context)
public org.apache.curator.CuratorZookeeperClient getZookeeperClient()
CuratorFrameworkgetZookeeperClient in interface CuratorFrameworkpublic org.apache.curator.utils.EnsurePath newNamespaceAwareEnsurePath(String path)
CuratorFrameworknewNamespaceAwareEnsurePath in interface CuratorFrameworkpath - path to ensureCopyright © 2011-2014 The Apache Software Foundation. All Rights Reserved.