public abstract class AbstractInstancePersistingDeployer<D extends BaseDefinition,I extends BaseInstance<D>> extends AbstractDeployer<D>
instances
of a
definition
.Modifier and Type | Field and Description |
---|---|
protected DomainRepository<I,java.lang.String> |
instanceRepository |
definitionKind, parser
Modifier | Constructor and Description |
---|---|
protected |
AbstractInstancePersistingDeployer(ZooKeeperConnection zkConnection,
org.springframework.data.repository.PagingAndSortingRepository<D,java.lang.String> definitionRespository,
DomainRepository<I,java.lang.String> instanceRepository,
XDParser parser,
ParsingContext definitionKind) |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeDelete(D definition)
Callback method that subclasses may override to get a chance to act on definitions that are about to be deleted.
|
void |
deleteAll()
Delete all the definitions
|
void |
deploy(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> properties)
Deploy a resource (job or stream).
|
BaseInstance<D> |
deploymentInfo(java.lang.String id)
Query deployment information about the definition whose ID is provided.
|
java.lang.Iterable<I> |
deploymentInfo(java.lang.String first,
java.lang.String last)
Query deployment information about definitions whose ids range from
first to last . |
protected abstract I |
makeInstance(D definition)
Create an running instance out of the given definition;
|
void |
undeploy(java.lang.String name) |
void |
undeployAll()
Undeploy all the deployed resources.
|
afterSave, basicDeploy, createDefinition, delete, findAll, findAll, findOne, getDefinitionRepository, getDeploymentPath, getZooKeeperConnection, save, throwAlreadyDeployedException, throwDefinitionAlreadyExistsException, throwDefinitionNotDeployable, throwNoSuchDefinitionException, throwNoSuchDefinitionException, throwNotDeployedException
protected DomainRepository<I extends BaseInstance<D>,java.lang.String> instanceRepository
protected AbstractInstancePersistingDeployer(ZooKeeperConnection zkConnection, org.springframework.data.repository.PagingAndSortingRepository<D,java.lang.String> definitionRespository, DomainRepository<I,java.lang.String> instanceRepository, XDParser parser, ParsingContext definitionKind)
protected void beforeDelete(D definition)
AbstractDeployer
beforeDelete
in class AbstractDeployer<D extends BaseDefinition>
public void undeploy(java.lang.String name)
public void deploy(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)
ResourceDeployer
name
- name of the resourceproperties
- deployment properties to use (may not be null)public void undeployAll()
ResourceDeployer
public void deleteAll()
ResourceDeployer
deleteAll
in interface ResourceDeployer<D extends BaseDefinition>
deleteAll
in class AbstractDeployer<D extends BaseDefinition>
public java.lang.Iterable<I> deploymentInfo(java.lang.String first, java.lang.String last)
first
to last
.public BaseInstance<D> deploymentInfo(java.lang.String id)