public class CuratorFrameworkImpl extends java.lang.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
|
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
|
java.lang.String |
getNamespace()
Return the current namespace or "" if none
|
Listenable<UnhandledErrorListener> |
getUnhandledErrorListenable()
Returns the listenable interface for unhandled errors
|
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()
Return true if the client is started, not closed, etc.
|
EnsurePath |
newNamespaceAwareEnsurePath(java.lang.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.
|
void |
sync(java.lang.String path,
java.lang.Object context)
Perform a sync on the given path - syncs are always in the background
|
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. |
public CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder)
protected CuratorFrameworkImpl(CuratorFrameworkImpl parent)
public boolean isStarted()
CuratorFrameworkisStarted in interface CuratorFrameworkpublic void start()
CuratorFrameworkstart in interface CuratorFrameworkpublic void close()
CuratorFrameworkclose in interface CuratorFrameworkclose in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic 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()
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(java.lang.String path,
java.lang.Object context)
CuratorFrameworksync in interface CuratorFrameworkpath - the pathcontext - optional contextprotected void internalSync(CuratorFrameworkImpl impl, java.lang.String path, java.lang.Object context)
public CuratorZookeeperClient getZookeeperClient()
CuratorFrameworkgetZookeeperClient in interface CuratorFrameworkpublic EnsurePath newNamespaceAwareEnsurePath(java.lang.String path)
CuratorFrameworknewNamespaceAwareEnsurePath in interface CuratorFrameworkpath - path to ensure