org.neo4j.kernel.ha.zookeeper
Class ClusterManager
java.lang.Object
org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
org.neo4j.kernel.ha.zookeeper.ClusterManager
- All Implemented Interfaces:
- org.apache.zookeeper.Watcher
public class ClusterManager
- extends AbstractZooKeeperManager
| 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 |
getAllMachines, getCachedMaster, getGraphDb, getHaServer, getMasterBasedOn, getMasterFromZooKeeper, instantiateZooKeeper, parseChild, readDataAsLong, readHaServer, shutdown |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClusterManager
public ClusterManager(String zooKeeperServers)
getMyMachineId
protected int getMyMachineId()
- Specified by:
getMyMachineId in class AbstractZooKeeperManager
waitForSyncConnected
public void waitForSyncConnected()
- Specified by:
waitForSyncConnected in class AbstractZooKeeperManager
getBackupPort
public int getBackupPort(int machineId)
process
public void process(org.apache.zookeeper.WatchedEvent event)
getMaster
public Machine getMaster()
getRoot
public String getRoot()
- Specified by:
getRoot in class AbstractZooKeeperManager
getSingleRootPath
public static String getSingleRootPath(org.apache.zookeeper.ZooKeeper keeper)
getConnectedSlaves
public Machine[] getConnectedSlaves()
- Returns the connected slaves in this cluster.
- Returns:
- the connected slaves in this cluster.
getZooKeeper
protected org.apache.zookeeper.ZooKeeper getZooKeeper()
- Specified by:
getZooKeeper in class AbstractZooKeeperManager
Copyright © 2011 The Neo4j Graph Database Project. All Rights Reserved.