public interface DistributedTestSupport
Modifier and Type | Method and Description |
---|---|
SpringXDTemplate |
ensureTemplate()
Return an instance of
SpringXDTemplate based on
the port configured for the admin server started by startup() . |
void |
shutdownAll()
Shut down all servers started, including those started via
startup() and all containers started via
startContainer(java.util.Properties) . |
void |
shutdownContainer(long pid)
Shut down the container JVM with the given process id.
|
void |
shutdownContainers()
Shut down all containers started via
startContainer(java.util.Properties) . |
com.oracle.tools.runtime.java.JavaApplication<com.oracle.tools.runtime.java.SimpleJavaApplication> |
startContainer()
Start a container in a new JVM.
|
com.oracle.tools.runtime.java.JavaApplication<com.oracle.tools.runtime.java.SimpleJavaApplication> |
startContainer(java.util.Properties properties)
Start a container in a new JVM, using the provided properties
as system properties for the container JVM process.
|
void |
startup()
Start the minimum required servers for a distributed XD system:
ZooKeeper
HSQL
Admin server (for serving REST endpoints)
|
java.util.Map<java.lang.Long,java.lang.String> |
waitForContainers()
Block the executing thread until all of the container JVMs
requested have started.
|
void startup()
SpringXDTemplate ensureTemplate()
SpringXDTemplate
based on
the port configured for the admin server started by startup()
.com.oracle.tools.runtime.java.JavaApplication<com.oracle.tools.runtime.java.SimpleJavaApplication> startContainer(java.util.Properties properties)
properties
- properties to provide to the container processcom.oracle.tools.runtime.java.JavaApplication<com.oracle.tools.runtime.java.SimpleJavaApplication> startContainer()
java.util.Map<java.lang.Long,java.lang.String> waitForContainers() throws java.lang.InterruptedException
java.lang.InterruptedException
ServerProcessUtils.waitForContainers(org.springframework.xd.rest.client.impl.SpringXDTemplate, java.util.Set<java.lang.Long>)
void shutdownContainer(long pid)
pid
- process id of container JVM to shut downvoid shutdownContainers() throws java.lang.InterruptedException
startContainer(java.util.Properties)
.
This method will block the executing thread until the
admin server indicates that there are no containers running.java.lang.InterruptedException
void shutdownAll() throws java.lang.InterruptedException
startup()
and all containers started via
startContainer(java.util.Properties)
.java.lang.InterruptedException