|
|||||||||
| 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(boolean start)
Create the server using a random port |
|
TestingServer(InstanceSpec spec,
boolean start)
Create the server using the given port |
|
TestingServer(int port)
Create and start the server using the given port |
|
TestingServer(int port,
boolean start)
Create the server using the given port |
|
TestingServer(int port,
File tempDirectory)
Create and start the server using the given port |
|
TestingServer(int port,
File tempDirectory,
boolean start)
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 |
restart()
Restart the server. |
void |
start()
Start the server |
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(boolean start)
throws Exception
start - True if the server should be started, false otherwise
Exception - errors
public TestingServer(int port)
throws Exception
port - the port
Exception - errors
public TestingServer(int port,
boolean start)
throws Exception
port - the portstart - True if the server should be started, false otherwise
Exception - errors
public TestingServer(int port,
File tempDirectory)
throws Exception
port - the porttempDirectory - directory to use
Exception - errors
public TestingServer(int port,
File tempDirectory,
boolean start)
throws Exception
port - the porttempDirectory - directory to usestart - True if the server should be started, false otherwise
Exception - errors
public TestingServer(InstanceSpec spec,
boolean start)
throws Exception
spec - instance detailsstart - True if the server should be started, false otherwise
Exception - errors| Method Detail |
|---|
public int getPort()
public File getTempDirectory()
public void start()
throws Exception
Exception
public void stop()
throws IOException
IOException
public void restart()
throws Exception
Exception
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 | ||||||||