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()
CuratorFramework
isStarted
in interface CuratorFramework
public void start()
CuratorFramework
start
in interface CuratorFramework
public void close()
CuratorFramework
close
in interface CuratorFramework
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public CuratorFramework nonNamespaceView()
CuratorFramework
nonNamespaceView
in interface CuratorFramework
public java.lang.String getNamespace()
CuratorFramework
getNamespace
in interface CuratorFramework
public CuratorFramework usingNamespace(java.lang.String newNamespace)
CuratorFramework
newNamespace
is null
.usingNamespace
in interface CuratorFramework
newNamespace
- the new namespace or null for nonepublic CreateBuilder create()
CuratorFramework
create
in interface CuratorFramework
public DeleteBuilder delete()
CuratorFramework
delete
in interface CuratorFramework
public ExistsBuilder checkExists()
CuratorFramework
checkExists
in interface CuratorFramework
public GetDataBuilder getData()
CuratorFramework
getData
in interface CuratorFramework
public SetDataBuilder setData()
CuratorFramework
setData
in interface CuratorFramework
public GetChildrenBuilder getChildren()
CuratorFramework
getChildren
in interface CuratorFramework
public GetACLBuilder getACL()
CuratorFramework
getACL
in interface CuratorFramework
public SetACLBuilder setACL()
CuratorFramework
setACL
in interface CuratorFramework
public CuratorTransaction inTransaction()
CuratorFramework
inTransaction
in interface CuratorFramework
public Listenable<ConnectionStateListener> getConnectionStateListenable()
CuratorFramework
getConnectionStateListenable
in interface CuratorFramework
public Listenable<CuratorListener> getCuratorListenable()
CuratorFramework
getCuratorListenable
in interface CuratorFramework
public Listenable<UnhandledErrorListener> getUnhandledErrorListenable()
CuratorFramework
getUnhandledErrorListenable
in interface CuratorFramework
public void sync(java.lang.String path, java.lang.Object context)
CuratorFramework
sync
in interface CuratorFramework
path
- the pathcontext
- optional contextprotected void internalSync(CuratorFrameworkImpl impl, java.lang.String path, java.lang.Object context)
public CuratorZookeeperClient getZookeeperClient()
CuratorFramework
getZookeeperClient
in interface CuratorFramework
public EnsurePath newNamespaceAwareEnsurePath(java.lang.String path)
CuratorFramework
newNamespaceAwareEnsurePath
in interface CuratorFramework
path
- path to ensure