org.apache.curator.test
Class TestingZooKeeperServer
java.lang.Object
org.apache.zookeeper.server.quorum.QuorumPeerMain
org.apache.curator.test.TestingZooKeeperServer
- All Implemented Interfaces:
- Closeable
public class TestingZooKeeperServer
- extends org.apache.zookeeper.server.quorum.QuorumPeerMain
- implements Closeable
Thanks to Jeremie BORDIER (ahfeel) for this code
| Fields inherited from class org.apache.zookeeper.server.quorum.QuorumPeerMain |
quorumPeer |
| Methods inherited from class org.apache.zookeeper.server.quorum.QuorumPeerMain |
initializeAndRun, main, runFromConfig |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestingZooKeeperServer
public TestingZooKeeperServer(QuorumConfigBuilder configBuilder)
TestingZooKeeperServer
public TestingZooKeeperServer(QuorumConfigBuilder configBuilder,
int thisInstanceIndex)
getQuorumPeer
public org.apache.zookeeper.server.quorum.QuorumPeer getQuorumPeer()
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 Closeable
- Throws:
IOException
start
public void start()
throws Exception
- Throws:
Exception
Copyright © 2011–2014 The Apache Software Foundation. All rights reserved.