public class DeploymentSupervisor
extends java.lang.Object
implements org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, org.springframework.beans.factory.DisposableBean
DeploymentSupervisor
instance will attempt
to request leadership, but at any given time only one DeploymentSupervisor
instance in the cluster will have leadership status.LeaderSelector
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEPLOYMENT_TIMEOUT_PROPERTY
Property for specifying the
deployment timeout . |
static java.lang.String |
QUIET_PERIOD_PROPERTY
Property for specifying the
quiet period
for deployments to new containers. |
Constructor and Description |
---|
DeploymentSupervisor(ZooKeeperConnection zkConnection,
ContainerRepository containerRepository,
AdminRepository adminRepository,
AdminAttributes adminAttributes,
StreamDefinitionRepository streamDefinitionRepository,
JobDefinitionRepository jobDefinitionRepository,
ModuleRegistry moduleRegistry,
ModuleOptionsMetadataResolver moduleOptionsMetadataResolver,
org.springframework.xd.dirt.server.ContainerMatcher containerMatcher,
DeploymentUnitStateCalculator stateCalculator)
Construct a
DeploymentSupervisor . |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
public static final java.lang.String QUIET_PERIOD_PROPERTY
quiet period
for deployments to new containers.public static final java.lang.String DEPLOYMENT_TIMEOUT_PROPERTY
deployment timeout
.public DeploymentSupervisor(ZooKeeperConnection zkConnection, ContainerRepository containerRepository, AdminRepository adminRepository, AdminAttributes adminAttributes, StreamDefinitionRepository streamDefinitionRepository, JobDefinitionRepository jobDefinitionRepository, ModuleRegistry moduleRegistry, ModuleOptionsMetadataResolver moduleOptionsMetadataResolver, org.springframework.xd.dirt.server.ContainerMatcher containerMatcher, DeploymentUnitStateCalculator stateCalculator)
DeploymentSupervisor
.zkConnection
- ZooKeeper connectioncontainerRepository
- repository for the containersadminRepository
- repository for the adminsadminAttributes
- attributes for the adminstreamDefinitionRepository
- repository for streams definitionsjobDefinitionRepository
- repository for job definitionsmoduleRegistry
- registry for modulesmoduleOptionsMetadataResolver
- resolver for module options metadatacontainerMatcher
- matches modules to containersstateCalculator
- calculator for stream/job statepublic void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean