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
|
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.
|
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()
CuratorFramework
getState
in interface CuratorFramework
public boolean isStarted()
CuratorFramework
isStarted
in interface CuratorFramework
public void start()
CuratorFramework
start
in interface CuratorFramework
public void close()
CuratorFramework
close
in interface Closeable
close
in interface AutoCloseable
close
in interface CuratorFramework
public CuratorFramework nonNamespaceView()
CuratorFramework
nonNamespaceView
in interface CuratorFramework
public String getNamespace()
CuratorFramework
getNamespace
in interface CuratorFramework
public CuratorFramework usingNamespace(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(String path, Object context)
CuratorFramework
sync
in interface CuratorFramework
path
- the pathcontext
- optional contextpublic SyncBuilder sync()
CuratorFramework
sync
in interface CuratorFramework
protected void internalSync(CuratorFrameworkImpl impl, String path, Object context)
public CuratorZookeeperClient getZookeeperClient()
CuratorFramework
getZookeeperClient
in interface CuratorFramework
public EnsurePath newNamespaceAwareEnsurePath(String path)
CuratorFramework
newNamespaceAwareEnsurePath
in interface CuratorFramework
path
- path to ensureCopyright © 2011–2014 The Apache Software Foundation. All rights reserved.