Package org.apache.solr.common.cloud

## Class ZkClientConnectionStrategy

- java.lang.Object
- - org.apache.solr.common.cloud.ZkClientConnectionStrategy

Direct Known Subclasses:
  `DefaultConnectionStrategy`

    public abstract class ZkClientConnectionStrategy
    extends Object

### Nested Class Summary

Nested Classes
`static interface` `ZkClientConnectionStrategy.ConnectedListener`
`static interface` `ZkClientConnectionStrategy.DisconnectedListener`
`static interface` `ZkClientConnectionStrategy.ZkUpdate`

### Constructor Summary

Constructors
`ZkClientConnectionStrategy()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `addConnectedListener​(ZkClientConnectionStrategy.ConnectedListener listener)`
`void` `addDisconnectedListener​(ZkClientConnectionStrategy.DisconnectedListener listener)`
`abstract void` `connect​(String zkServerAddress, int zkClientTimeout, org.apache.zookeeper.Watcher watcher, ZkClientConnectionStrategy.ZkUpdate updater)`
`void` `connected()`
`protected SolrZooKeeper` `createSolrZooKeeper​(String serverAddress, int zkClientTimeout, org.apache.zookeeper.Watcher watcher)`
`void` `disconnected()`
`ZkCredentialsProvider` `getZkCredentialsToAddAutomatically()`
`boolean` `hasZkCredentialsToAddAutomatically()`
`abstract void` `reconnect​(String serverAddress, int zkClientTimeout, org.apache.zookeeper.Watcher watcher, ZkClientConnectionStrategy.ZkUpdate updater)`
`void` `removeDisconnectedListener​(ZkClientConnectionStrategy.DisconnectedListener listener)`
`void` `setZkCredentialsToAddAutomatically​(ZkCredentialsProvider zkCredentialsToAddAutomatically)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ZkClientConnectionStrategy

    public ZkClientConnectionStrategy()

### Method Detail

#### connect

    public abstract void connect​(String zkServerAddress,
                                 int zkClientTimeout,
                                 org.apache.zookeeper.Watcher watcher,
                                 ZkClientConnectionStrategy.ZkUpdate updater)
                          throws IOException,
                                 InterruptedException,
                                 TimeoutException

Throws:
  `IOException`
  `InterruptedException`
  `TimeoutException`

#### reconnect

    public abstract void reconnect​(String serverAddress,
                                   int zkClientTimeout,
                                   org.apache.zookeeper.Watcher watcher,
                                   ZkClientConnectionStrategy.ZkUpdate updater)
                            throws IOException,
                                   InterruptedException,
                                   TimeoutException

Throws:
  `IOException`
  `InterruptedException`
  `TimeoutException`

#### disconnected

    public void disconnected()

#### connected

    public void connected()

#### addDisconnectedListener

    public void addDisconnectedListener​(ZkClientConnectionStrategy.DisconnectedListener listener)

#### removeDisconnectedListener

    public void removeDisconnectedListener​(ZkClientConnectionStrategy.DisconnectedListener listener)

#### addConnectedListener

    public void addConnectedListener​(ZkClientConnectionStrategy.ConnectedListener listener)

#### setZkCredentialsToAddAutomatically

    public void setZkCredentialsToAddAutomatically​(ZkCredentialsProvider zkCredentialsToAddAutomatically)

#### hasZkCredentialsToAddAutomatically

    public boolean hasZkCredentialsToAddAutomatically()

#### getZkCredentialsToAddAutomatically

    public ZkCredentialsProvider getZkCredentialsToAddAutomatically()

#### createSolrZooKeeper

    protected SolrZooKeeper createSolrZooKeeper​(String serverAddress,
                                                int zkClientTimeout,
                                                org.apache.zookeeper.Watcher watcher)
                                         throws IOException

Throws:
  `IOException`