Package org.apache.solr.common.cloud
Class ConnectionManager
java.lang.Object
org.apache.solr.common.cloud.ConnectionManager
- All Implemented Interfaces:
org.apache.zookeeper.Watcher
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
org.apache.zookeeper.Watcher.Event, org.apache.zookeeper.Watcher.WatcherType -
Constructor Summary
ConstructorsConstructorDescriptionConnectionManager(String name, SolrZkClient client, String zkServerAddress, ZkClientConnectionStrategy strat, OnReconnect onConnect, BeforeReconnect beforeReconnect, ConnectionManager.IsClosed isClosed) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanbooleanbooleanvoidprocess(org.apache.zookeeper.WatchedEvent event) voidwaitForConnected(long waitForConnection) Wait for an established zookeeper connectionvoidwaitForDisconnected(long timeout) voidwaitSleep(long waitFor)
-
Constructor Details
-
ConnectionManager
public ConnectionManager(String name, SolrZkClient client, String zkServerAddress, ZkClientConnectionStrategy strat, OnReconnect onConnect, BeforeReconnect beforeReconnect, ConnectionManager.IsClosed isClosed)
-
-
Method Details
-
process
public void process(org.apache.zookeeper.WatchedEvent event) - Specified by:
processin interfaceorg.apache.zookeeper.Watcher
-
isConnectedAndNotClosed
public boolean isConnectedAndNotClosed() -
isConnected
public boolean isConnected() -
close
public void close() -
isLikelyExpired
public boolean isLikelyExpired() -
waitSleep
public void waitSleep(long waitFor) -
waitForConnected
Wait for an established zookeeper connection- Parameters:
waitForConnection- time to wait, in ms- Throws:
TimeoutException
-
waitForDisconnected
- Throws:
InterruptedExceptionTimeoutException
-