Class TestConnectionStrategy


  • public class TestConnectionStrategy
    extends org.apache.solr.common.cloud.DefaultConnectionStrategy
    Connection strategy that creates instances of TestableZooKeeper instead of plain ZooKeeper objects. Useful for adding pause and disconnect events.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.solr.common.cloud.ZkClientConnectionStrategy

        org.apache.solr.common.cloud.ZkClientConnectionStrategy.ConnectedListener, org.apache.solr.common.cloud.ZkClientConnectionStrategy.DisconnectedListener, org.apache.solr.common.cloud.ZkClientConnectionStrategy.ZkUpdate
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.zookeeper.ZooKeeper newZooKeeperInstance​(String serverAddress, int zkClientTimeout, org.apache.zookeeper.Watcher watcher)  
      • Methods inherited from class org.apache.solr.common.cloud.DefaultConnectionStrategy

        connect, reconnect
      • Methods inherited from class org.apache.solr.common.cloud.ZkClientConnectionStrategy

        addConnectedListener, addDisconnectedListener, connected, createZooKeeper, disconnected, forName, getZkCredentialsToAddAutomatically, hasZkCredentialsToAddAutomatically, removeDisconnectedListener, setZkCredentialsToAddAutomatically
    • Constructor Detail

      • TestConnectionStrategy

        public TestConnectionStrategy()
    • Method Detail

      • newZooKeeperInstance

        protected org.apache.zookeeper.ZooKeeper newZooKeeperInstance​(String serverAddress,
                                                                      int zkClientTimeout,
                                                                      org.apache.zookeeper.Watcher watcher)
                                                               throws IOException
        Overrides:
        newZooKeeperInstance in class org.apache.solr.common.cloud.ZkClientConnectionStrategy
        Throws:
        IOException