org.I0Itec.zkclient
Class InMemoryConnection

java.lang.Object
  extended by org.I0Itec.zkclient.InMemoryConnection
All Implemented Interfaces:
IZkConnection

public class InMemoryConnection
extends Object
implements IZkConnection


Constructor Summary
InMemoryConnection()
           
 
Method Summary
 void close()
           
 void connect(org.apache.zookeeper.Watcher watcher)
           
 String create(String path, byte[] data, org.apache.zookeeper.CreateMode mode)
           
 void delete(String path)
           
 boolean exists(String path, boolean watch)
           
 List<String> getChildren(String path, boolean watch)
           
 long getCreateTime(String path)
           
 String getServers()
           
 org.apache.zookeeper.ZooKeeper.States getZookeeperState()
           
 byte[] readData(String path, org.apache.zookeeper.data.Stat stat, boolean watch)
           
 void writeData(String path, byte[] data, int expectedVersion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryConnection

public InMemoryConnection()
Method Detail

close

public void close()
           throws InterruptedException
Specified by:
close in interface IZkConnection
Throws:
InterruptedException

connect

public void connect(org.apache.zookeeper.Watcher watcher)
Specified by:
connect in interface IZkConnection

create

public String create(String path,
                     byte[] data,
                     org.apache.zookeeper.CreateMode mode)
              throws org.apache.zookeeper.KeeperException,
                     InterruptedException
Specified by:
create in interface IZkConnection
Throws:
org.apache.zookeeper.KeeperException
InterruptedException

delete

public void delete(String path)
            throws InterruptedException,
                   org.apache.zookeeper.KeeperException
Specified by:
delete in interface IZkConnection
Throws:
InterruptedException
org.apache.zookeeper.KeeperException

exists

public boolean exists(String path,
                      boolean watch)
               throws org.apache.zookeeper.KeeperException,
                      InterruptedException
Specified by:
exists in interface IZkConnection
Throws:
org.apache.zookeeper.KeeperException
InterruptedException

getChildren

public List<String> getChildren(String path,
                                boolean watch)
                         throws org.apache.zookeeper.KeeperException,
                                InterruptedException
Specified by:
getChildren in interface IZkConnection
Throws:
org.apache.zookeeper.KeeperException
InterruptedException

getZookeeperState

public org.apache.zookeeper.ZooKeeper.States getZookeeperState()
Specified by:
getZookeeperState in interface IZkConnection

readData

public byte[] readData(String path,
                       org.apache.zookeeper.data.Stat stat,
                       boolean watch)
                throws org.apache.zookeeper.KeeperException,
                       InterruptedException
Specified by:
readData in interface IZkConnection
Throws:
org.apache.zookeeper.KeeperException
InterruptedException

writeData

public void writeData(String path,
                      byte[] data,
                      int expectedVersion)
               throws org.apache.zookeeper.KeeperException,
                      InterruptedException
Specified by:
writeData in interface IZkConnection
Throws:
org.apache.zookeeper.KeeperException
InterruptedException

getCreateTime

public long getCreateTime(String path)
Specified by:
getCreateTime in interface IZkConnection

getServers

public String getServers()
Specified by:
getServers in interface IZkConnection


Copyright © 2011. All Rights Reserved.