com.netflix.curator.framework.imps
Class CuratorFrameworkImpl

java.lang.Object
  extended by com.netflix.curator.framework.imps.CuratorFrameworkImpl
All Implemented Interfaces:
CuratorFramework, Closeable
Direct Known Subclasses:
NonNamespaceFacade

public class CuratorFrameworkImpl
extends Object
implements CuratorFramework


Constructor Summary
  CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder)
           
protected CuratorFrameworkImpl(CuratorFrameworkImpl parent)
           
 
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
protected  void internalSync(CuratorFrameworkImpl impl, String path, Object context)
           
 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 context)
          Perform a sync on the given path - syncs are always in the background
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CuratorFrameworkImpl

public CuratorFrameworkImpl(CuratorFrameworkFactory.Builder builder)
                     throws IOException
Throws:
IOException

CuratorFrameworkImpl

protected CuratorFrameworkImpl(CuratorFrameworkImpl parent)
Method Detail

isStarted

public boolean isStarted()
Description copied from interface: CuratorFramework
Return true if the client is started, not closed, etc.

Specified by:
isStarted in interface CuratorFramework
Returns:
true/false

start

public void start()
Description copied from interface: CuratorFramework
Start the client. Most mutator methods will not work until the client is started

Specified by:
start in interface CuratorFramework

close

public void close()
Description copied from interface: CuratorFramework
Stop the client

Specified by:
close in interface CuratorFramework
Specified by:
close in interface Closeable

nonNamespaceView

public CuratorFramework nonNamespaceView()
Description copied from interface: CuratorFramework
Returns a facade of the current instance that does _not_ automatically pre-pend the namespace to all paths

Specified by:
nonNamespaceView in interface CuratorFramework
Returns:
facade

create

public CreateBuilder create()
Description copied from interface: CuratorFramework
Start a create builder

Specified by:
create in interface CuratorFramework
Returns:
builder object

delete

public DeleteBuilder delete()
Description copied from interface: CuratorFramework
Start a delete builder

Specified by:
delete in interface CuratorFramework
Returns:
builder object

checkExists

public ExistsBuilder checkExists()
Description copied from interface: CuratorFramework
Start an exists builder

Specified by:
checkExists in interface CuratorFramework
Returns:
builder object

getData

public GetDataBuilder getData()
Description copied from interface: CuratorFramework
Start a get data builder

Specified by:
getData in interface CuratorFramework
Returns:
builder object

setData

public SetDataBuilder setData()
Description copied from interface: CuratorFramework
Start a set data builder

Specified by:
setData in interface CuratorFramework
Returns:
builder object

getChildren

public GetChildrenBuilder getChildren()
Description copied from interface: CuratorFramework
Start a get children builder

Specified by:
getChildren in interface CuratorFramework
Returns:
builder object

getACL

public GetACLBuilder getACL()
Description copied from interface: CuratorFramework
Start a get ACL builder

Specified by:
getACL in interface CuratorFramework
Returns:
builder object

setACL

public SetACLBuilder setACL()
Description copied from interface: CuratorFramework
Start a set ACL builder

Specified by:
setACL in interface CuratorFramework
Returns:
builder object

getConnectionStateListenable

public Listenable<ConnectionStateListener> getConnectionStateListenable()
Description copied from interface: CuratorFramework
Returns the listenable interface for the Connect State

Specified by:
getConnectionStateListenable in interface CuratorFramework
Returns:
listenable

getCuratorListenable

public Listenable<CuratorListener> getCuratorListenable()
Description copied from interface: CuratorFramework
Returns the listenable interface for events

Specified by:
getCuratorListenable in interface CuratorFramework
Returns:
listenable

getUnhandledErrorListenable

public Listenable<UnhandledErrorListener> getUnhandledErrorListenable()
Description copied from interface: CuratorFramework
Returns the listenable interface for unhandled errors

Specified by:
getUnhandledErrorListenable in interface CuratorFramework
Returns:
listenable

sync

public void sync(String path,
                 Object context)
Description copied from interface: CuratorFramework
Perform a sync on the given path - syncs are always in the background

Specified by:
sync in interface CuratorFramework
Parameters:
path - the path
context - optional context

internalSync

protected void internalSync(CuratorFrameworkImpl impl,
                            String path,
                            Object context)

getZookeeperClient

public CuratorZookeeperClient getZookeeperClient()
Description copied from interface: CuratorFramework
Return the managed zookeeper client

Specified by:
getZookeeperClient in interface CuratorFramework
Returns:
client

newNamespaceAwareEnsurePath

public EnsurePath newNamespaceAwareEnsurePath(String path)
Description copied from interface: CuratorFramework
Allocates an ensure path instance that is namespace aware

Specified by:
newNamespaceAwareEnsurePath in interface CuratorFramework
Parameters:
path - path to ensure
Returns:
new EnsurePath instance


Copyright © 2012. All Rights Reserved.