org.neo4j.kernel.ha.zookeeper
Class ZooClient

java.lang.Object
  extended by org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
      extended by org.neo4j.kernel.ha.zookeeper.ZooClient
All Implemented Interfaces:
org.apache.zookeeper.Watcher

public class ZooClient
extends AbstractZooKeeperManager


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
org.apache.zookeeper.Watcher.Event
 
Field Summary
 
Fields inherited from class org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
HA_SERVERS_CHILD, SESSION_TIME_OUT
 
Constructor Summary
ZooClient(String servers, int machineId, long storeCreationTime, long storeId, long committedTx, ResponseReceiver receiver, String haServer, String storeDir)
           
 
Method Summary
protected  String getHaServer(int machineId, boolean wait)
           
 void getJmxConnectionData(ConnectionInformation connection)
           
protected  int getMyMachineId()
           
 String getRoot()
           
protected  org.apache.zookeeper.ZooKeeper getZooKeeper()
           
 void process(org.apache.zookeeper.WatchedEvent event)
           
 void setCommittedTx(long tx)
           
protected  void setDataChangeWatcher(String child, int currentMasterId)
           
 void setJmxConnectionData(JMXServiceURL jmxUrl, String instanceId)
           
 void shutdown()
           
 void waitForSyncConnected()
           
 
Methods inherited from class org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
getAllMachines, getCachedMaster, getMasterBasedOn, getMasterFromZooKeeper, instantiateZooKeeper, parseChild, readDataAsLong, readHaServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZooClient

public ZooClient(String servers,
                 int machineId,
                 long storeCreationTime,
                 long storeId,
                 long committedTx,
                 ResponseReceiver receiver,
                 String haServer,
                 String storeDir)
Method Detail

getMyMachineId

protected int getMyMachineId()
Specified by:
getMyMachineId in class AbstractZooKeeperManager

process

public void process(org.apache.zookeeper.WatchedEvent event)

waitForSyncConnected

public void waitForSyncConnected()
Specified by:
waitForSyncConnected in class AbstractZooKeeperManager

setDataChangeWatcher

protected void setDataChangeWatcher(String child,
                                    int currentMasterId)

getRoot

public String getRoot()
Specified by:
getRoot in class AbstractZooKeeperManager

setJmxConnectionData

public void setJmxConnectionData(JMXServiceURL jmxUrl,
                                 String instanceId)

getJmxConnectionData

public void getJmxConnectionData(ConnectionInformation connection)

setCommittedTx

public void setCommittedTx(long tx)

shutdown

public void shutdown()
Overrides:
shutdown in class AbstractZooKeeperManager

getZooKeeper

protected org.apache.zookeeper.ZooKeeper getZooKeeper()
Specified by:
getZooKeeper in class AbstractZooKeeperManager

getHaServer

protected String getHaServer(int machineId,
                             boolean wait)
Overrides:
getHaServer in class AbstractZooKeeperManager


Copyright © 2010 The Neo4j Graph Database Project. All Rights Reserved.