public interface EPDeploymentAdmin
Modifier and Type | Method and Description |
---|---|
String |
add(Module module)
Adds a module in undeployed state, generating a deployment id and returning the generated deployment id of the module.
|
void |
add(Module module,
String assignedDeploymentId)
Adds a module in undeployed state, using the provided deployment id as a unique identifier for the module.
|
DeploymentResult |
deploy(Module module,
DeploymentOptions options)
Deploy a single module returning a generated deployment id to use when undeploying statements as well as
additional statement-level information.
|
DeploymentResult |
deploy(Module module,
DeploymentOptions options,
String assignedDeploymentId)
Deploy a single module using the deployment id provided as a parameter.
|
DeploymentResult |
deploy(String deploymentId,
DeploymentOptions options)
Deploy a previously undeployed module.
|
DeploymentInformation |
getDeployment(String deploymentId)
Returns the deployment information for a given deployment.
|
DeploymentInformation[] |
getDeploymentInformation()
Returns deployment information for all known modules.
|
DeploymentOrder |
getDeploymentOrder(Collection<Module> modules,
DeploymentOrderOptions options)
Compute a deployment order among the modules passed in considering their uses-dependency declarations
and considering the already-deployed modules.
|
String[] |
getDeployments()
Return deployment ids of all currently known modules.
|
boolean |
isDeployed(String moduleName)
Determine if a named module is already deployed (in deployed state), returns true if one or more modules of the same
name are deployed or false when no module of that name is deployed.
|
Module |
parse(String eplModuleText)
Parse the module text passed in, returning the module.
|
DeploymentResult |
parseDeploy(String eplModuleText)
Shortcut method to parse and deploy a single module from a string text buffer, without providing a module URI name or
archive name or user object.
|
DeploymentResult |
parseDeploy(String eplModuleText,
String moduleURI,
String moduleArchive,
Object userObject)
Shortcut method to parse and deploy a single module from a string text buffer.
|
Module |
read(File file)
Read the module by reading the text file and return the module.
|
Module |
read(InputStream stream,
String moduleUri)
Read the input stream and return the module.
|
Module |
read(String resource)
Read the resource by opening from classpath and return the module.
|
Module |
read(URL url)
Read the module by reading from the URL provided and return the module.
|
DeploymentResult |
readDeploy(InputStream stream,
String moduleURI,
String moduleArchive,
Object userObject)
Shortcut method to read and deploy a single module from an input stream.
|
DeploymentResult |
readDeploy(String resource,
String moduleURI,
String moduleArchive,
Object userObject)
Shortcut method to read and deploy a single module from a classpath resource.
|
void |
remove(String deploymentId)
Remove a module that is currently in undeployed state.
|
UndeploymentResult |
undeploy(String deploymentId)
Undeploy a previously deployed module.
|
UndeploymentResult |
undeploy(String deploymentId,
UndeploymentOptions undeploymentOptions)
Undeploy a previously deployed module.
|
UndeploymentResult |
undeployRemove(String deploymentId)
Undeploy a single module, if its in deployed state, and removes it from the known modules.
|
UndeploymentResult |
undeployRemove(String deploymentId,
UndeploymentOptions undeploymentOptions)
Undeploy a single module, if its in deployed state, and removes it from the known modules.
|
Module read(InputStream stream, String moduleUri) throws IOException, ParseException
stream
- to readmoduleUri
- uri of the moduleIOException
- when the io operation failedParseException
- when parsing of the module failedModule read(String resource) throws IOException, ParseException
resource
- name of the classpath resourceIOException
- when the resource could not be readParseException
- when parsing of the module failedModule read(File file) throws IOException, ParseException
file
- the file to readIOException
- when the file could not be readParseException
- when parsing of the module failedModule read(URL url) throws IOException, ParseException
url
- the URL to readIOException
- when the url input stream could not be readParseException
- when parsing of the module failedModule parse(String eplModuleText) throws IOException, ParseException
eplModuleText
- to parseIOException
- when the parser failed to read the string bufferParseException
- when parsing of the module failedDeploymentOrder getDeploymentOrder(Collection<Module> modules, DeploymentOrderOptions options) throws DeploymentException
The operation also checks and reports circular dependencies.
Pass in @{link DeploymentOrderOptions} to customize the behavior if this method. When passing no options or passing default options, the default behavior checks uses-dependencies and circular dependencies.
modules
- to determine ordering foroptions
- operation options or null for default optionsDeploymentOrderException
- when any module dependencies are not satisfiedDeploymentException
DeploymentResult deploy(Module module, DeploymentOptions options) throws DeploymentException, InterruptedException
Pass in @{link DeploymentOptions} to customize the behavior. When passing no options or passing default options, the operation first compiles all EPL statements before starting each statement, fails-fast on the first statement that fails to start and rolls back (destroys) any started statement on a failure.
When setting validate-only in the deployment options, the method returns a null-value on success.
module
- to deployoptions
- operation options or null for default optionsDeploymentActionException
- when the deployment fails, contains a list of deployment failuresDeploymentLockException
- to indicate a problem obtaining the necessary lockInterruptedException
- when lock-taking was interruptedDeploymentException
DeploymentResult deploy(Module module, DeploymentOptions options, String assignedDeploymentId) throws DeploymentActionException, DeploymentLockException, InterruptedException
Pass in @{link DeploymentOptions} to customize the behavior. When passing no options or passing default options, the operation first compiles all EPL statements before starting each statement, fails-fast on the first statement that fails to start and rolls back (destroys) any started statement on a failure.
When setting validate-only in the deployment options, the method returns a null-value on success.
module
- to deployoptions
- operation options or null for default optionsassignedDeploymentId
- the deployment id to assignDeploymentActionException
- when the deployment fails, contains a list of deployment failuresDeploymentLockException
- to indicate a problem obtaining the necessary lockInterruptedException
- when lock-taking was interruptedUndeploymentResult undeployRemove(String deploymentId) throws DeploymentNotFoundException
This operation destroys all statements previously associated to the deployed module and also removes this module from the list deployments list.
deploymentId
- of the deployment to undeploy.DeploymentNotFoundException
- when the deployment id could not be resolved to a deploymentUndeploymentResult undeployRemove(String deploymentId, UndeploymentOptions undeploymentOptions) throws DeploymentNotFoundException
This operation, by default, destroys all statements previously associated to the deployed module and also removes this module from the list deployments list. Use the options object to control whether statements get destroyed.
deploymentId
- of the deployment to undeploy.undeploymentOptions
- for controlling undeployment, can be a null valueDeploymentNotFoundException
- when the deployment id could not be resolved to a deploymentString[] getDeployments()
DeploymentInformation getDeployment(String deploymentId)
deploymentId
- to return the deployment information for.DeploymentInformation[] getDeploymentInformation()
boolean isDeployed(String moduleName)
moduleName
- to look upDeploymentResult readDeploy(String resource, String moduleURI, String moduleArchive, Object userObject) throws IOException, ParseException, DeploymentException, InterruptedException
Uses default options for performing deployment dependency checking and deployment.
resource
- to readmoduleURI
- uri of module to assign or null if not applicablemoduleArchive
- archive name of module to assign or null if not applicableuserObject
- user object to assign to module, passed along unused as part of deployment information, or null if not applicableIOException
- when the file could not be readParseException
- when parsing of the module failedDeploymentOrderException
- when any module dependencies are not satisfiedDeploymentActionException
- when the deployment fails, contains a list of deployment failuresDeploymentLockException
- to indicate a problem obtaining the necessary lockInterruptedException
- when lock-taking was interruptedDeploymentException
DeploymentResult readDeploy(InputStream stream, String moduleURI, String moduleArchive, Object userObject) throws IOException, ParseException, DeploymentException, InterruptedException
Uses default options for performing deployment dependency checking and deployment.
Leaves the stream unclosed.
stream
- to readmoduleURI
- uri of module to assign or null if not applicablemoduleArchive
- archive name of module to assign or null if not applicableuserObject
- user object to assign to module, passed along unused as part of deployment information, or null if not applicableIOException
- when the file could not be readParseException
- when parsing of the module failedDeploymentOrderException
- when any module dependencies are not satisfiedDeploymentActionException
- when the deployment fails, contains a list of deployment failuresDeploymentLockException
- to indicate a problem obtaining the necessary lockInterruptedException
- when lock-taking was interruptedDeploymentException
DeploymentResult parseDeploy(String eplModuleText, String moduleURI, String moduleArchive, Object userObject) throws IOException, ParseException, DeploymentException, InterruptedException
Uses default options for performing deployment dependency checking and deployment.
eplModuleText
- to parsemoduleURI
- uri of module to assign or null if not applicablemoduleArchive
- archive name of module to assign or null if not applicableuserObject
- user object to assign to module, passed along unused as part of deployment information, or null if not applicableIOException
- when the file could not be readParseException
- when parsing of the module failedDeploymentOrderException
- when any module dependencies are not satisfiedDeploymentActionException
- when the deployment fails, contains a list of deployment failuresDeploymentLockException
- to indicate a problem obtaining the necessary lockInterruptedException
- when lock-taking was interruptedDeploymentException
DeploymentResult parseDeploy(String eplModuleText) throws IOException, ParseException, DeploymentException, InterruptedException
Uses default options for performing deployment dependency checking and deployment.
eplModuleText
- to parseIOException
- when the file could not be readParseException
- when parsing of the module failedDeploymentOrderException
- when any module dependencies are not satisfiedDeploymentActionException
- when the deployment fails, contains a list of deployment failuresDeploymentLockException
- to indicate a problem obtaining the necessary lockInterruptedException
- when lock-taking was interruptedDeploymentException
String add(Module module)
module
- to addvoid add(Module module, String assignedDeploymentId)
module
- to addassignedDeploymentId
- deployment id to assignvoid remove(String deploymentId) throws DeploymentException
This call may only be used on undeployed modules.
deploymentId
- of the module to removeDeploymentStateException
- when attempting to remove a module that does not exist or a module that is not in undeployed stateDeploymentNotFoundException
- if no such deployment id is knownDeploymentException
DeploymentResult deploy(String deploymentId, DeploymentOptions options) throws DeploymentException, InterruptedException
deploymentId
- of the module to deployoptions
- deployment optionsDeploymentStateException
- when attempting to deploy a module that does not exist is already deployedDeploymentOrderException
- when deployment dependencies are not satisfiedDeploymentActionException
- when the deployment (or validation when setting validate-only) failedDeploymentNotFoundException
- if no such deployment id is knownDeploymentLockException
- to indicate a problem obtaining the necessary lockInterruptedException
- when lock-taking was interruptedDeploymentException
UndeploymentResult undeploy(String deploymentId) throws DeploymentException, InterruptedException
deploymentId
- of the module to undeployDeploymentStateException
- when attempting to undeploy a module that does not exist is already undeployedDeploymentNotFoundException
- when the deployment id could not be resolvedInterruptedException
- when lock-taking was interruptedDeploymentException
UndeploymentResult undeploy(String deploymentId, UndeploymentOptions undeploymentOptions) throws DeploymentException, InterruptedException
deploymentId
- of the module to undeployundeploymentOptions
- undeployment options, or null for default behaviorDeploymentStateException
- when attempting to undeploy a module that does not exist is already undeployedDeploymentNotFoundException
- when the deployment id could not be resolvedInterruptedException
- when lock-taking was interruptedDeploymentException