public interface EPDeploymentService
Modifier and Type | Method and Description |
---|---|
void |
addDeploymentStateListener(DeploymentStateListener listener)
Add a deployment state listener
|
EPDeployment |
deploy(EPCompiled compiled)
Deploy a compiled module and with the default options.
|
EPDeployment |
deploy(EPCompiled compiled,
DeploymentOptions options)
Deploy a compiled module and with the provided options.
|
EPDeployment |
getDeployment(java.lang.String deploymentId)
Returns the deployment.
|
EPDeploymentDependencyConsumed |
getDeploymentDependenciesConsumed(java.lang.String deploymentId)
Obtain information about the dependencies that the given deployment has on other deployments,
i.e.
|
EPDeploymentDependencyProvided |
getDeploymentDependenciesProvided(java.lang.String deploymentId)
Obtain information about other deployments that are depending on the given deployment,
i.e.
|
java.lang.String[] |
getDeployments()
Returns the deployment ids of all deployments.
|
java.util.Iterator<DeploymentStateListener> |
getDeploymentStateListeners()
Returns an iterator of deployment state listeners (read-only)
|
EPStatement |
getStatement(java.lang.String deploymentId,
java.lang.String statementName)
Returns the statement of a given deployment.
|
boolean |
isDeployed(java.lang.String deploymentId)
Returns indicator whether a deployment for this deployment id exists
|
void |
removeAllDeploymentStateListeners()
Removes all deployment state listener
|
void |
removeDeploymentStateListener(DeploymentStateListener listener)
Remove a deployment state listener
|
EPDeploymentRollout |
rollout(java.util.Collection<EPDeploymentRolloutCompiled> items)
Roll-out multiple deployments.
|
EPDeploymentRollout |
rollout(java.util.Collection<EPDeploymentRolloutCompiled> items,
RolloutOptions options)
Roll-out multiple deployments.
|
void |
undeploy(java.lang.String deploymentId)
Undeploy a deployment and with the default options.
|
void |
undeploy(java.lang.String deploymentId,
UndeploymentOptions options)
Undeploy a deployment and with the provided options
|
void |
undeployAll()
Undeploy all deployments and with the default options.
|
void |
undeployAll(UndeploymentOptions options)
Undeploy all deployments and with the provided options.
|
EPDeployment deploy(EPCompiled compiled) throws EPDeployException
compiled
- byte codeEPDeployException
- when the deployment failedEPDeployment deploy(EPCompiled compiled, DeploymentOptions options) throws EPDeployException
compiled
- byte codeoptions
- deployment optionsEPDeployException
- when the deployment failedjava.lang.String[] getDeployments()
void undeploy(java.lang.String deploymentId) throws EPUndeployException
deploymentId
- of the deployment to undeployEPUndeployException
- when the deployment does not exist or the undeployment failed and the deployment remains deployedvoid undeploy(java.lang.String deploymentId, UndeploymentOptions options) throws EPUndeployException
deploymentId
- of the deployment to undeployoptions
- undeployment optionsEPUndeployException
- when the deployment does not exist or the undeployment failed and the deployment remains deployedvoid undeployAll() throws EPUndeployException
Does not un-deploy staged deployments.
EPUndeployException
- when the undeployment failed, of the deployments may remain deployedvoid undeployAll(UndeploymentOptions options) throws EPUndeployException
options
- undeployment options or null if none providedEPUndeployException
- when the undeployment failed, of the deployments may remain deployedEPStatement getStatement(java.lang.String deploymentId, java.lang.String statementName)
A statement is uniquely identified by the deployment id that deployed the statement and by the statement name.
deploymentId
- deployment id of the statementstatementName
- statement nameEPDeployment getDeployment(java.lang.String deploymentId)
A deployment is uniquely identified by its deployment id.
deploymentId
- the deployment id of the deploymentvoid addDeploymentStateListener(DeploymentStateListener listener)
listener
- to addvoid removeDeploymentStateListener(DeploymentStateListener listener)
listener
- to removejava.util.Iterator<DeploymentStateListener> getDeploymentStateListeners()
void removeAllDeploymentStateListeners()
boolean isDeployed(java.lang.String deploymentId)
deploymentId
- deployment idEPDeploymentRollout rollout(java.util.Collection<EPDeploymentRolloutCompiled> items) throws EPDeployException
rollout(Collection, RolloutOptions)
.items
- compiled units and deployment optionsEPDeployException
- when any of the deployments failedEPDeploymentRollout rollout(java.util.Collection<EPDeploymentRolloutCompiled> items, RolloutOptions options) throws EPDeployException
Deploys each compiled module, either deploying all compilation units or deploying none of the compilation units.
Does not reorder compilation units and expects compilation units to be ordered according to module dependencies (if any).
The step-by-step is as allows:
In case any of the above steps fail the runtime completely rolls back all changes.
items
- compiled units and deployment optionsoptions
- rollout optionsEPDeployException
- when any of the deployments failedEPDeploymentDependencyProvided getDeploymentDependenciesProvided(java.lang.String deploymentId) throws EPException
deploymentId
- deployment idEPException
- when the required lock cannot be obtainedEPDeploymentDependencyConsumed getDeploymentDependenciesConsumed(java.lang.String deploymentId) throws EPException
deploymentId
- deployment idEPException
- when the required lock cannot be obtained