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 to a collection of containers indicated
by the ContainerMatcher
passed into
the constructor.
General usage is to invoke writeDeployment
and examine the ModuleDeploymentStatus
object that is returned. This invocation will block until:
DEFAULT_TIMEOUT
.DeploymentUnitStateCalculator
Constructor and Description |
---|
ModuleDeploymentWriter(ZooKeeperConnection zkConnection,
ContainerMatcher containerMatcher)
Construct a
ModuleDeploymentWriter with the default timeout
value indicated by DEFAULT_TIMEOUT . |
ModuleDeploymentWriter(ZooKeeperConnection zkConnection,
ContainerMatcher containerMatcher,
long timeout)
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, ContainerMatcher containerMatcher)
ModuleDeploymentWriter
with the default timeout
value indicated by DEFAULT_TIMEOUT
.zkConnection
- ZooKeeper connectioncontainerMatcher
- matcher for modules to containerspublic ModuleDeploymentWriter(ZooKeeperConnection zkConnection, ContainerMatcher containerMatcher, long timeout)
ModuleDeploymentWriter
.zkConnection
- ZooKeeper connectioncontainerMatcher
- matcher for modules to containerstimeout
- amount of time to wait for module deploymentsprotected 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