public class ModuleDeploymentWriter
extends java.lang.Object
/xd/deployments/modules
.
There are several writeDeployment
methods that allow for targeting
a deployment to a specific container or a collection of containers.
General usage is to invoke writeDeployment
and examine the ModuleDeploymentStatus
object that is returned. This invocation will block until:
DeploymentUnitStateCalculator
Constructor and Description |
---|
ModuleDeploymentWriter(ZooKeeperConnection zkConnection,
long deploymentTimeout)
Construct a
ModuleDeploymentWriter . |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection<ModuleDeploymentStatus> |
processResults(org.springframework.xd.dirt.server.ModuleDeploymentWriter.ResultCollector collector)
Block the calling thread until all expected results are returned
or until a timeout occurs.
|
protected java.util.Collection<ModuleDeploymentStatus> |
writeDeployment(ModuleDescriptor moduleDescriptor,
ModuleDeploymentPropertiesProvider<RuntimeModuleDeploymentProperties> provider,
java.util.Collection<Container> containers)
Write module deployment requests for the provided module descriptor
using the runtime deployment properties provided by the provider
to the given matched containers.
|
protected ModuleDeploymentStatus |
writeDeployment(ModuleDescriptor moduleDescriptor,
RuntimeModuleDeploymentProperties deploymentProperties,
Container container)
Write a module deployment request for the provided module descriptor
using the provided properties to the given matched container.
|
public ModuleDeploymentWriter(ZooKeeperConnection zkConnection, long deploymentTimeout)
ModuleDeploymentWriter
.zkConnection
- ZooKeeper connectiondeploymentTimeout
- Deployment timeout to wait for statusprotected ModuleDeploymentStatus writeDeployment(ModuleDescriptor moduleDescriptor, RuntimeModuleDeploymentProperties deploymentProperties, Container container) throws java.lang.InterruptedException, NoContainerException
moduleDescriptor
- descriptor for module to deploydeploymentProperties
- deployment properties for modulecontainer
- the container to deployjava.lang.InterruptedException
- if the executing thread is interruptedNoContainerException
- if there are no containers that match the criteria
for module deploymentprotected java.util.Collection<ModuleDeploymentStatus> writeDeployment(ModuleDescriptor moduleDescriptor, ModuleDeploymentPropertiesProvider<RuntimeModuleDeploymentProperties> provider, java.util.Collection<Container> containers) throws java.lang.InterruptedException, NoContainerException
moduleDescriptor
- descriptor for module to deployprovider
- runtime deployment properties provider for the modulecontainers
- the matched containers to deployjava.lang.InterruptedException
- if the executing thread is interruptedNoContainerException
- if there are no containers that match the criteria
for module deploymentprotected java.util.Collection<ModuleDeploymentStatus> processResults(org.springframework.xd.dirt.server.ModuleDeploymentWriter.ResultCollector collector) throws java.lang.InterruptedException
collector
- ZooKeeper watch used to collect resultsjava.lang.InterruptedException