|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.curator.test.TestingServer
public class TestingServer
manages an internally running ZooKeeper server. FOR TESTING PURPOSES ONLY
| Constructor Summary | |
|---|---|
TestingServer()
Create the server using a random port |
|
TestingServer(InstanceSpec spec)
|
|
TestingServer(int port)
Create the server using the given port |
|
TestingServer(int port,
File tempDirectory)
Create the server using the given port |
|
| Method Summary | |
|---|---|
void |
close()
Close the server and any open clients and delete the temp directory |
String |
getConnectString()
Returns the connection string to use |
int |
getPort()
Return the port being used |
File |
getTempDirectory()
Returns the temp directory being used |
void |
stop()
Stop the server without deleting the temp directory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestingServer()
throws Exception
Exception - errors
public TestingServer(int port)
throws Exception
port - the port
Exception - errors
public TestingServer(int port,
File tempDirectory)
throws Exception
port - the porttempDirectory - directory to use
Exception - errors
public TestingServer(InstanceSpec spec)
throws Exception
Exception| Method Detail |
|---|
public int getPort()
public File getTempDirectory()
public void stop()
throws IOException
IOException
public void close()
throws IOException
close in interface CloseableIOExceptionpublic String getConnectString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||