Package org.apache.curator.test
Class TestingZooKeeperServer
java.lang.Object
org.apache.curator.test.TestingZooKeeperServer
- All Implemented Interfaces:
Closeable
,AutoCloseable
Thanks to Jeremie BORDIER (ahfeel) for this code
-
Constructor Summary
ConstructorDescriptionTestingZooKeeperServer
(QuorumConfigBuilder configBuilder) TestingZooKeeperServer
(QuorumConfigBuilder configBuilder, int thisInstanceIndex) -
Method Summary
-
Constructor Details
-
TestingZooKeeperServer
-
TestingZooKeeperServer
-
-
Method Details
-
getInstanceSpecs
-
kill
public void kill() -
restart
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
- Throws:
IOException
-
getInstanceSpec
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
start
- Throws:
Exception
-
getLocalPort
public int getLocalPort()
-