com.netflix.curator.framework
Interface CuratorFramework

All Superinterfaces:
Closeable
All Known Implementing Classes:
CuratorFrameworkImpl, NonNamespaceFacade

public interface CuratorFramework
extends Closeable

Zookeeper framework-style client


Method Summary
 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
 Listenable<UnhandledErrorListener> getUnhandledErrorListenable()
          Returns the listenable interface for unhandled errors
 CuratorZookeeperClient getZookeeperClient()
          Return the managed zookeeper client
 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.
 void sync(String path, Object backgroundContextObject)
          Perform a sync on the given path - syncs are always in the background
 

Method Detail

start

void start()
Start the client. Most mutator methods will not work until the client is started


close

void close()
Stop the client

Specified by:
close in interface Closeable

isStarted

boolean isStarted()
Return true if the client is started, not closed, etc.

Returns:
true/false

create

CreateBuilder create()
Start a create builder

Returns:
builder object

delete

DeleteBuilder delete()
Start a delete builder

Returns:
builder object

checkExists

ExistsBuilder checkExists()
Start an exists builder

Returns:
builder object

getData

GetDataBuilder getData()
Start a get data builder

Returns:
builder object

setData

SetDataBuilder setData()
Start a set data builder

Returns:
builder object

getChildren

GetChildrenBuilder getChildren()
Start a get children builder

Returns:
builder object

getACL

GetACLBuilder getACL()
Start a get ACL builder

Returns:
builder object

setACL

SetACLBuilder setACL()
Start a set ACL builder

Returns:
builder object

sync

void sync(String path,
          Object backgroundContextObject)
Perform a sync on the given path - syncs are always in the background

Parameters:
path - the path
backgroundContextObject - optional context

getConnectionStateListenable

Listenable<ConnectionStateListener> getConnectionStateListenable()
Returns the listenable interface for the Connect State

Returns:
listenable

getCuratorListenable

Listenable<CuratorListener> getCuratorListenable()
Returns the listenable interface for events

Returns:
listenable

getUnhandledErrorListenable

Listenable<UnhandledErrorListener> getUnhandledErrorListenable()
Returns the listenable interface for unhandled errors

Returns:
listenable

nonNamespaceView

CuratorFramework nonNamespaceView()
Returns a facade of the current instance that does _not_ automatically pre-pend the namespace to all paths

Returns:
facade

getZookeeperClient

CuratorZookeeperClient getZookeeperClient()
Return the managed zookeeper client

Returns:
client

newNamespaceAwareEnsurePath

EnsurePath newNamespaceAwareEnsurePath(String path)
Allocates an ensure path instance that is namespace aware

Parameters:
path - path to ensure
Returns:
new EnsurePath instance


Copyright © 2012. All Rights Reserved.