public class ZooClient extends Object implements Lifecycle, CompatibilityMonitor
| Modifier and Type | Field and Description |
|---|---|
static Machine |
NO_MACHINE |
| Constructor and Description |
|---|
ZooClient(org.neo4j.kernel.impl.util.StringLogger stringLogger,
Config conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCompatibilityModeListener(CompatibilityModeListener listener) |
void |
addZooListener(ZooListener zooListener) |
Machine |
getCachedMaster() |
String |
getClusterServer() |
org.neo4j.kernel.impl.nioneo.store.StoreId |
getClusterStoreId(org.neo4j.kernel.ha.cluster.zoo.ZooClient.WaitMode mode) |
int |
getCurrentMasterNotify() |
String |
getHaServer() |
String |
getRoot() |
org.apache.zookeeper.ZooKeeper |
getZooKeeper(boolean sync) |
void |
init() |
String |
refreshMasterFromZooKeeper()
Tries to discover the master from the zookeeper information.
|
void |
removeCompatibilityModeListener(CompatibilityModeListener listener) |
void |
shutdown() |
void |
start() |
void |
stop() |
String |
toString() |
void |
waitForSyncConnected() |
public static final Machine NO_MACHINE
public ZooClient(org.neo4j.kernel.impl.util.StringLogger stringLogger, Config conf)
public void init()
throws Throwable
public void start()
throws Throwable
public void stop()
throws Throwable
public String refreshMasterFromZooKeeper()
Pair of a Master and the Machine it resides
on. If the new master is different than the current then the current is
invalidated and if allowChange is set to true then the a connection to
the new master is established otherwise a NO_MASTER is returned.public Machine getCachedMaster()
public String getRoot()
public int getCurrentMasterNotify()
public org.apache.zookeeper.ZooKeeper getZooKeeper(boolean sync)
public org.neo4j.kernel.impl.nioneo.store.StoreId getClusterStoreId(org.neo4j.kernel.ha.cluster.zoo.ZooClient.WaitMode mode)
public void addZooListener(ZooListener zooListener)
public void addCompatibilityModeListener(CompatibilityModeListener listener)
addCompatibilityModeListener in interface CompatibilityMonitorpublic void removeCompatibilityModeListener(CompatibilityModeListener listener)
removeCompatibilityModeListener in interface CompatibilityMonitorpublic String getClusterServer()
public String getHaServer()
public final void waitForSyncConnected()
Copyright © 2002–2013 The Neo4j Graph Database Project. All rights reserved.