org.neo4j.kernel.ha.zookeeper
Class ZooClient
java.lang.Object
org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager
org.neo4j.kernel.ha.zookeeper.ZooClient
- All Implemented Interfaces:
- org.apache.zookeeper.Watcher
public class ZooClient
- 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 |
bootstrap, getAllMachines, getAllMachines, getCachedMaster, getGraphDb, getMasterBasedOn, getMasterClientToMachine, getMasterFromZooKeeper, getServers, getSessionTimeout, instantiateZooKeeper, invalidateMaster, parseChild, readDataRepresentingInstance, readHaServer, waitForSyncConnected |
ZooClient
public ZooClient(AbstractGraphDatabase graphDb,
Map<String,String> config,
ResponseReceiver receiver)
flushUnprocessedEvents
protected void flushUnprocessedEvents(org.apache.zookeeper.ZooKeeper zooKeeper)
- Flush all events we go before initialization of ZooKeeper/WatcherImpl was completed.
- Parameters:
zooKeeper - ZooKeeper instance to use when processing. We cannot rely on the
zooKeeper instance inherited from ZooClient since the contract says that such fields
are only guaranteed to be published when the constructor has returned, and at this
point it hasn't.
getMyMachineId
protected int getMyMachineId()
- Specified by:
getMyMachineId in class AbstractZooKeeperManager
getConnectionLostHandler
protected Client.ConnectionLostHandler getConnectionLostHandler()
- Overrides:
getConnectionLostHandler in class AbstractZooKeeperManager
process
public void process(org.apache.zookeeper.WatchedEvent event)
waitForSyncConnected
public void waitForSyncConnected(org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager.WaitMode mode)
subscribeToDataChangeWatcher
protected void subscribeToDataChangeWatcher(String child)
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
isShutdown
public boolean isShutdown()
getZooKeeper
public org.apache.zookeeper.ZooKeeper getZooKeeper(boolean sync)
- Specified by:
getZooKeeper in class AbstractZooKeeperManager
getHaServer
protected String getHaServer(int machineId,
boolean wait)
- Overrides:
getHaServer in class AbstractZooKeeperManager
getClusterStoreId
public StoreId getClusterStoreId(org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager.WaitMode waitMode)
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.