org.I0Itec.zkclient
Interface IZkConnection

All Known Implementing Classes:
InMemoryConnection, ZkConnection

public interface IZkConnection


Method Summary
 void close()
           
 void connect(org.apache.zookeeper.Watcher watcher)
           
 java.lang.String create(java.lang.String path, byte[] data, org.apache.zookeeper.CreateMode mode)
           
 void delete(java.lang.String path)
           
 boolean exists(java.lang.String path, boolean watch)
           
 java.util.List<java.lang.String> getChildren(java.lang.String path, boolean watch)
           
 long getCreateTime(java.lang.String path)
           
 java.lang.String getServers()
           
 org.apache.zookeeper.ZooKeeper.States getZookeeperState()
           
 byte[] readData(java.lang.String path, org.apache.zookeeper.data.Stat stat, boolean watch)
           
 void writeData(java.lang.String path, byte[] data, int expectedVersion)
           
 org.apache.zookeeper.data.Stat writeDataReturnStat(java.lang.String path, byte[] data, int expectedVersion)
           
 

Method Detail

connect

void connect(org.apache.zookeeper.Watcher watcher)

close

void close()
           throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

create

java.lang.String create(java.lang.String path,
                        byte[] data,
                        org.apache.zookeeper.CreateMode mode)
                        throws org.apache.zookeeper.KeeperException,
                               java.lang.InterruptedException
Throws:
org.apache.zookeeper.KeeperException
java.lang.InterruptedException

delete

void delete(java.lang.String path)
            throws java.lang.InterruptedException,
                   org.apache.zookeeper.KeeperException
Throws:
java.lang.InterruptedException
org.apache.zookeeper.KeeperException

exists

boolean exists(java.lang.String path,
               boolean watch)
               throws org.apache.zookeeper.KeeperException,
                      java.lang.InterruptedException
Throws:
org.apache.zookeeper.KeeperException
java.lang.InterruptedException

getChildren

java.util.List<java.lang.String> getChildren(java.lang.String path,
                                             boolean watch)
                                             throws org.apache.zookeeper.KeeperException,
                                                    java.lang.InterruptedException
Throws:
org.apache.zookeeper.KeeperException
java.lang.InterruptedException

readData

byte[] readData(java.lang.String path,
                org.apache.zookeeper.data.Stat stat,
                boolean watch)
                throws org.apache.zookeeper.KeeperException,
                       java.lang.InterruptedException
Throws:
org.apache.zookeeper.KeeperException
java.lang.InterruptedException

writeData

void writeData(java.lang.String path,
               byte[] data,
               int expectedVersion)
               throws org.apache.zookeeper.KeeperException,
                      java.lang.InterruptedException
Throws:
org.apache.zookeeper.KeeperException
java.lang.InterruptedException

writeDataReturnStat

org.apache.zookeeper.data.Stat writeDataReturnStat(java.lang.String path,
                                                   byte[] data,
                                                   int expectedVersion)
                                                   throws org.apache.zookeeper.KeeperException,
                                                          java.lang.InterruptedException
Throws:
org.apache.zookeeper.KeeperException
java.lang.InterruptedException

getZookeeperState

org.apache.zookeeper.ZooKeeper.States getZookeeperState()

getCreateTime

long getCreateTime(java.lang.String path)
                   throws org.apache.zookeeper.KeeperException,
                          java.lang.InterruptedException
Throws:
org.apache.zookeeper.KeeperException
java.lang.InterruptedException

getServers

java.lang.String getServers()