|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.core.deploy.EPDeploymentAdminImpl
public class EPDeploymentAdminImpl
Deployment administrative implementation.
Constructor Summary | |
---|---|
EPDeploymentAdminImpl(EPAdministratorSPI epService,
DeploymentStateService deploymentStateService,
StatementEventTypeRef statementEventTypeRef,
EventAdapterService eventAdapterService,
StatementIsolationService statementIsolationService,
StatementIdGenerator optionalStatementIdGenerator,
FilterService filterService)
Ctor. |
Method Summary | |
---|---|
java.lang.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,
java.lang.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,
java.lang.String assignedDeploymentId)
Deploy a single module using the deployment id provided as a parameter. |
DeploymentResult |
deploy(java.lang.String deploymentId,
DeploymentOptions options)
Deploy a previously undeployed module. |
DeploymentInformation |
getDeployment(java.lang.String deploymentId)
Returns the deployment information for a given deployment. |
DeploymentInformation[] |
getDeploymentInformation()
Returns deployment information for all known modules. |
DeploymentOrder |
getDeploymentOrder(java.util.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. |
java.lang.String[] |
getDeployments()
Return deployment ids of all currently known modules. |
boolean |
isDeployed(java.lang.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(java.lang.String eplModuleText)
Parse the module text passed in, returning the module. |
DeploymentResult |
parseDeploy(java.lang.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(java.lang.String buffer,
java.lang.String moduleURI,
java.lang.String moduleArchive,
java.lang.Object userObject)
Shortcut method to parse and deploy a single module from a string text buffer. |
Module |
read(java.io.File file)
Read the module by reading the text file and return the module. |
Module |
read(java.io.InputStream stream,
java.lang.String uri)
Read the input stream and return the module. |
Module |
read(java.lang.String resource)
Read the resource by opening from classpath and return the module. |
Module |
read(java.net.URL url)
Read the module by reading from the URL provided and return the module. |
DeploymentResult |
readDeploy(java.io.InputStream stream,
java.lang.String moduleURI,
java.lang.String moduleArchive,
java.lang.Object userObject)
Shortcut method to read and deploy a single module from an input stream. |
DeploymentResult |
readDeploy(java.lang.String resource,
java.lang.String moduleURI,
java.lang.String moduleArchive,
java.lang.Object userObject)
Shortcut method to read and deploy a single module from a classpath resource. |
void |
remove(java.lang.String deploymentId)
Remove a module that is currently in undeployed state. |
UndeploymentResult |
undeploy(java.lang.String deploymentId)
Undeploy a previously deployed module. |
UndeploymentResult |
undeploy(java.lang.String deploymentId,
UndeploymentOptions undeploymentOptions)
Undeploy a previously deployed module. |
UndeploymentResult |
undeployRemove(java.lang.String deploymentId)
Undeploy a single module, if its in deployed state, and removes it from the known modules. |
UndeploymentResult |
undeployRemove(java.lang.String deploymentId,
UndeploymentOptions undeploymentOptions)
Undeploy a single module, if its in deployed state, and removes it from the known modules. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EPDeploymentAdminImpl(EPAdministratorSPI epService, DeploymentStateService deploymentStateService, StatementEventTypeRef statementEventTypeRef, EventAdapterService eventAdapterService, StatementIsolationService statementIsolationService, StatementIdGenerator optionalStatementIdGenerator, FilterService filterService)
epService
- administrative SPIdeploymentStateService
- deployment state maintenance servicestatementEventTypeRef
- maintains statement-eventtype relationshipeventAdapterService
- event wrap servicestatementIsolationService
- for isolated statement executionMethod Detail |
---|
public Module read(java.io.InputStream stream, java.lang.String uri) throws java.io.IOException, ParseException
EPDeploymentAdmin
read
in interface EPDeploymentAdmin
stream
- to readuri
- uri of the module
java.io.IOException
- when the io operation failed
ParseException
- when parsing of the module failedpublic Module read(java.io.File file) throws java.io.IOException, ParseException
EPDeploymentAdmin
read
in interface EPDeploymentAdmin
file
- the file to read
java.io.IOException
- when the file could not be read
ParseException
- when parsing of the module failedpublic Module read(java.net.URL url) throws java.io.IOException, ParseException
EPDeploymentAdmin
read
in interface EPDeploymentAdmin
url
- the URL to read
java.io.IOException
- when the url input stream could not be read
ParseException
- when parsing of the module failedpublic Module read(java.lang.String resource) throws java.io.IOException, ParseException
EPDeploymentAdmin
read
in interface EPDeploymentAdmin
resource
- name of the classpath resource
java.io.IOException
- when the resource could not be read
ParseException
- when parsing of the module failedpublic DeploymentResult deploy(Module module, DeploymentOptions options, java.lang.String assignedDeploymentId) throws DeploymentActionException
EPDeploymentAdmin
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.
deploy
in interface EPDeploymentAdmin
module
- to deployoptions
- operation options or null for default optionsassignedDeploymentId
- the deployment id to assign
DeploymentActionException
- when the deployment fails, contains a list of deployment failurespublic DeploymentResult deploy(Module module, DeploymentOptions options) throws DeploymentActionException
EPDeploymentAdmin
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.
deploy
in interface EPDeploymentAdmin
module
- to deployoptions
- operation options or null for default options
DeploymentActionException
- when the deployment fails, contains a list of deployment failurespublic Module parse(java.lang.String eplModuleText) throws java.io.IOException, ParseException
EPDeploymentAdmin
parse
in interface EPDeploymentAdmin
eplModuleText
- to parse
java.io.IOException
- when the parser failed to read the string buffer
ParseException
- when parsing of the module failedpublic UndeploymentResult undeployRemove(java.lang.String deploymentId) throws DeploymentNotFoundException
EPDeploymentAdmin
This operation destroys all statements previously associated to the deployed module and also removes this module from the list deployments list.
undeployRemove
in interface EPDeploymentAdmin
deploymentId
- of the deployment to undeploy.
DeploymentNotFoundException
- when the deployment id could not be resolved to a deploymentpublic UndeploymentResult undeployRemove(java.lang.String deploymentId, UndeploymentOptions undeploymentOptions) throws DeploymentNotFoundException
EPDeploymentAdmin
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.
undeployRemove
in interface EPDeploymentAdmin
deploymentId
- of the deployment to undeploy.undeploymentOptions
- for controlling undeployment, can be a null value
DeploymentNotFoundException
- when the deployment id could not be resolved to a deploymentpublic UndeploymentResult undeploy(java.lang.String deploymentId) throws DeploymentStateException, DeploymentNotFoundException
EPDeploymentAdmin
undeploy
in interface EPDeploymentAdmin
deploymentId
- of the module to undeploy
DeploymentStateException
- when attempting to undeploy a module that does not exist is already undeployed
DeploymentNotFoundException
- when the deployment id could not be resolvedpublic UndeploymentResult undeploy(java.lang.String deploymentId, UndeploymentOptions undeploymentOptions) throws DeploymentException
EPDeploymentAdmin
undeploy
in interface EPDeploymentAdmin
deploymentId
- of the module to undeployundeploymentOptions
- undeployment options, or null for default behavior
DeploymentStateException
- when attempting to undeploy a module that does not exist is already undeployed
DeploymentNotFoundException
- when the deployment id could not be resolved
DeploymentException
public java.lang.String[] getDeployments()
EPDeploymentAdmin
getDeployments
in interface EPDeploymentAdmin
public DeploymentInformation getDeployment(java.lang.String deploymentId)
EPDeploymentAdmin
getDeployment
in interface EPDeploymentAdmin
deploymentId
- to return the deployment information for.
public DeploymentInformation[] getDeploymentInformation()
EPDeploymentAdmin
getDeploymentInformation
in interface EPDeploymentAdmin
public DeploymentOrder getDeploymentOrder(java.util.Collection<Module> modules, DeploymentOrderOptions options) throws DeploymentOrderException
EPDeploymentAdmin
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.
getDeploymentOrder
in interface EPDeploymentAdmin
modules
- to determine ordering foroptions
- operation options or null for default options
DeploymentOrderException
- when any module dependencies are not satisfiedpublic boolean isDeployed(java.lang.String moduleName)
EPDeploymentAdmin
isDeployed
in interface EPDeploymentAdmin
moduleName
- to look up
public DeploymentResult readDeploy(java.io.InputStream stream, java.lang.String moduleURI, java.lang.String moduleArchive, java.lang.Object userObject) throws java.io.IOException, ParseException, DeploymentOrderException, DeploymentActionException
EPDeploymentAdmin
Uses default options for performing deployment dependency checking and deployment.
Leaves the stream unclosed.
readDeploy
in interface EPDeploymentAdmin
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 applicable
java.io.IOException
- when the file could not be read
ParseException
- when parsing of the module failed
DeploymentOrderException
- when any module dependencies are not satisfied
DeploymentActionException
- when the deployment fails, contains a list of deployment failurespublic DeploymentResult readDeploy(java.lang.String resource, java.lang.String moduleURI, java.lang.String moduleArchive, java.lang.Object userObject) throws java.io.IOException, ParseException, DeploymentOrderException, DeploymentActionException
EPDeploymentAdmin
Uses default options for performing deployment dependency checking and deployment.
readDeploy
in interface EPDeploymentAdmin
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 applicable
java.io.IOException
- when the file could not be read
ParseException
- when parsing of the module failed
DeploymentOrderException
- when any module dependencies are not satisfied
DeploymentActionException
- when the deployment fails, contains a list of deployment failurespublic DeploymentResult parseDeploy(java.lang.String eplModuleText) throws java.io.IOException, ParseException, DeploymentException
EPDeploymentAdmin
Uses default options for performing deployment dependency checking and deployment.
parseDeploy
in interface EPDeploymentAdmin
eplModuleText
- to parse
java.io.IOException
- when the file could not be read
ParseException
- when parsing of the module failed
DeploymentOrderException
- when any module dependencies are not satisfied
DeploymentActionException
- when the deployment fails, contains a list of deployment failures
DeploymentException
public DeploymentResult parseDeploy(java.lang.String buffer, java.lang.String moduleURI, java.lang.String moduleArchive, java.lang.Object userObject) throws java.io.IOException, ParseException, DeploymentOrderException, DeploymentActionException
EPDeploymentAdmin
Uses default options for performing deployment dependency checking and deployment.
parseDeploy
in interface EPDeploymentAdmin
buffer
- 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 applicable
java.io.IOException
- when the file could not be read
ParseException
- when parsing of the module failed
DeploymentOrderException
- when any module dependencies are not satisfied
DeploymentActionException
- when the deployment fails, contains a list of deployment failurespublic void add(Module module, java.lang.String assignedDeploymentId)
EPDeploymentAdmin
add
in interface EPDeploymentAdmin
module
- to addassignedDeploymentId
- deployment id to assignpublic java.lang.String add(Module module)
EPDeploymentAdmin
add
in interface EPDeploymentAdmin
module
- to add
public DeploymentResult deploy(java.lang.String deploymentId, DeploymentOptions options) throws DeploymentNotFoundException, DeploymentStateException, DeploymentOrderException, DeploymentActionException
EPDeploymentAdmin
deploy
in interface EPDeploymentAdmin
deploymentId
- of the module to deployoptions
- deployment options
DeploymentNotFoundException
- if no such deployment id is known
DeploymentStateException
- when attempting to deploy a module that does not exist is already deployed
DeploymentOrderException
- when deployment dependencies are not satisfied
DeploymentActionException
- when the deployment (or validation when setting validate-only) failedpublic void remove(java.lang.String deploymentId) throws DeploymentStateException, DeploymentNotFoundException
EPDeploymentAdmin
This call may only be used on undeployed modules.
remove
in interface EPDeploymentAdmin
deploymentId
- of the module to remove
DeploymentStateException
- when attempting to remove a module that does not exist or a module that is not in undeployed state
DeploymentNotFoundException
- if no such deployment id is known
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |