org.neo4j.kernel.ha.zookeeper
Class ZooKeeperClusterClient
java.lang.Object
org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
org.neo4j.kernel.ha.zookeeper.ZooKeeperClusterClient
- All Implemented Interfaces:
- org.apache.zookeeper.Watcher, ClusterClient
public class ZooKeeperClusterClient
- extends AbstractZooKeeperManager
- implements ClusterClient
| Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher |
org.apache.zookeeper.Watcher.Event |
| Methods inherited from class org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager |
bootstrap, getAllMachines, getAllMachines, getCachedMaster, getConnectionLostHandler, getGraphDb, getHaServer, getMasterBasedOn, getMasterClientToMachine, getMasterFromZooKeeper, getServers, getSessionTimeout, instantiateZooKeeper, invalidateMaster, parseChild, readDataRepresentingInstance, readHaServer, shutdown, waitForSyncConnected |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZooKeeperClusterClient
public ZooKeeperClusterClient(String zooKeeperServers)
ZooKeeperClusterClient
public ZooKeeperClusterClient(String zooKeeperServers,
AbstractGraphDatabase db)
ZooKeeperClusterClient
public ZooKeeperClusterClient(String zooKeeperServers,
String clusterName)
ZooKeeperClusterClient
public ZooKeeperClusterClient(String zooKeeperServers,
String clusterName,
AbstractGraphDatabase db,
long sessionTimeout)
getMyMachineId
protected int getMyMachineId()
- Specified by:
getMyMachineId in class AbstractZooKeeperManager
waitForSyncConnected
public void waitForSyncConnected(org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager.WaitMode waitMode)
getBackupPort
public int getBackupPort(int machineId)
- Specified by:
getBackupPort in interface ClusterClient
process
public void process(org.apache.zookeeper.WatchedEvent event)
- Specified by:
process in interface org.apache.zookeeper.Watcher
getMaster
public Machine getMaster()
- Specified by:
getMaster in interface ClusterClient
getMasterClient
public Pair<Master,Machine> getMasterClient()
- Specified by:
getMasterClient in interface ClusterClient
getRoot
public String getRoot()
- Specified by:
getRoot in class AbstractZooKeeperManager
asRootPath
public static String asRootPath(StoreId storeId)
getClusterStoreId
public static StoreId getClusterStoreId(org.apache.zookeeper.ZooKeeper keeper,
String clusterName)
getConnectedSlaves
public Machine[] getConnectedSlaves()
- Returns the connected slaves in this cluster.
- Specified by:
getConnectedSlaves in interface ClusterClient
- Returns:
- the connected slaves in this cluster.
getZooKeeper
public org.apache.zookeeper.ZooKeeper getZooKeeper(boolean sync)
- Specified by:
getZooKeeper in class AbstractZooKeeperManager
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.