public class StreamDeployer extends AbstractInstancePersistingDeployer<StreamDefinition,Stream>
StreamDeployer
that uses provided
StreamDefinitionRepository
and StreamRepository
to
persist stream deployment and undeployment requests.instanceRepository
definitionKind
Constructor and Description |
---|
StreamDeployer(ZooKeeperConnection zkConnection,
StreamDefinitionRepository repository,
StreamRepository streamRepository,
XDParser parser)
Construct a StreamDeployer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
beforeDelete(StreamDefinition definition)
Callback method that subclasses may override to get a chance to act on definitions that are about to be deleted.
|
protected StreamDefinition |
createDefinition(java.lang.String name,
java.lang.String definition) |
protected java.lang.String |
getDeploymentPath(StreamDefinition definition)
Return the ZooKeeper path used for deployment requests for the
given definition.
|
protected Stream |
makeInstance(StreamDefinition definition)
Create an running instance out of the given definition;
|
deleteAll, deploy, deploymentInfo, deploymentInfo, undeploy, undeployAll
afterSave, basicDeploy, delete, findAll, findAll, findOne, getDefinitionRepository, getZooKeeperConnection, save, throwAlreadyDeployedException, throwDefinitionAlreadyExistsException, throwDefinitionNotDeployable, throwNoSuchDefinitionException, throwNoSuchDefinitionException, throwNotDeployedException
public StreamDeployer(ZooKeeperConnection zkConnection, StreamDefinitionRepository repository, StreamRepository streamRepository, XDParser parser)
zkConnection
- ZooKeeper connectionrepository
- repository for stream definitionsstreamRepository
- repository for stream instancesparser
- stream definition parserprotected Stream makeInstance(StreamDefinition definition)
makeInstance
in class AbstractInstancePersistingDeployer<StreamDefinition,Stream>
protected StreamDefinition createDefinition(java.lang.String name, java.lang.String definition)
createDefinition
in class AbstractDeployer<StreamDefinition>
protected java.lang.String getDeploymentPath(StreamDefinition definition)
getDeploymentPath
in class AbstractDeployer<StreamDefinition>
definition
- definition for which to obtain pathprotected void beforeDelete(StreamDefinition definition)
beforeDelete
in class AbstractInstancePersistingDeployer<StreamDefinition,Stream>