Class TestingZooKeeperServer

java.lang.Object
org.apache.curator.test.TestingZooKeeperServer
All Implemented Interfaces:
Closeable, AutoCloseable

public class TestingZooKeeperServer extends Object implements Closeable
Thanks to Jeremie BORDIER (ahfeel) for this code
  • Constructor Details

    • TestingZooKeeperServer

      public TestingZooKeeperServer(QuorumConfigBuilder configBuilder)
    • TestingZooKeeperServer

      public TestingZooKeeperServer(QuorumConfigBuilder configBuilder, int thisInstanceIndex)
  • Method Details

    • getInstanceSpecs

      public Collection<InstanceSpec> getInstanceSpecs()
    • kill

      public void kill()
    • restart

      public void restart() throws Exception
      Restart the server. If the server is running it will be stopped and then started again. If it is not running (in a LATENT or STOPPED state) then it will be restarted. If it is in a CLOSED state then an exception will be thrown.
      Throws:
      Exception
    • stop

      public void stop() throws IOException
      Throws:
      IOException
    • getInstanceSpec

      public InstanceSpec getInstanceSpec()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • start

      public void start() throws Exception
      Throws:
      Exception
    • getLocalPort

      public int getLocalPort()