org.neo4j.kernel.ha.zookeeper
Class ZooKeeperClusterClient

java.lang.Object
  extended by org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
      extended by org.neo4j.kernel.ha.zookeeper.ZooKeeperClusterClient
All Implemented Interfaces:
ClusterClient

public class ZooKeeperClusterClient
extends AbstractZooKeeperManager
implements ClusterClient


Field Summary
protected static int SESSION_TIME_OUT
           
 
Fields inherited from class org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
cachedMaster, clientLockReadTimeout, clientReadTimeout, HA_SERVERS_CHILD, maxConcurrentChannelsPerSlave, msgLog, NO_MASTER, NO_MASTER_MACHINE_PAIR
 
Constructor Summary
ZooKeeperClusterClient(String zooKeeperServers)
           
ZooKeeperClusterClient(String zooKeeperServers, String clusterName)
           
ZooKeeperClusterClient(String zooKeeperServers, org.neo4j.kernel.impl.util.StringLogger msgLog, String clusterName, int sessionTimeout)
           
 
Method Summary
 int getBackupPort(int machineId)
           
 Machine[] getConnectedSlaves()
          Returns the connected slaves in this cluster.
 Machine getMaster()
           
 org.neo4j.helpers.Pair<Master,Machine> getMasterClient()
           
protected  int getMyMachineId()
           
 String getRoot()
           
 org.apache.zookeeper.ZooKeeper getZooKeeper(boolean sync)
           
 
Methods inherited from class org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
asRootPath, bootstrap, getAllMachines, getAllMachines, getCachedMaster, getClusterStoreId, getHaServer, getMasterBasedOn, getMasterClientToMachine, getMasterFromZooKeeper, getServers, getSessionTimeout, invalidateMaster, parseChild, readDataRepresentingInstance, readHaServer, shutdown, waitForSyncConnected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_TIME_OUT

protected static final int SESSION_TIME_OUT
See Also:
Constant Field Values
Constructor Detail

ZooKeeperClusterClient

public ZooKeeperClusterClient(String zooKeeperServers)

ZooKeeperClusterClient

public ZooKeeperClusterClient(String zooKeeperServers,
                              String clusterName)

ZooKeeperClusterClient

public ZooKeeperClusterClient(String zooKeeperServers,
                              org.neo4j.kernel.impl.util.StringLogger msgLog,
                              String clusterName,
                              int sessionTimeout)
Method Detail

getBackupPort

public int getBackupPort(int machineId)
Specified by:
getBackupPort in interface ClusterClient

getMaster

public Machine getMaster()
Specified by:
getMaster in interface ClusterClient

getMasterClient

public org.neo4j.helpers.Pair<Master,Machine> getMasterClient()
Specified by:
getMasterClient in interface ClusterClient

getRoot

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

getMyMachineId

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

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.