public class EPAdministratorImpl extends Object implements EPAdministratorSPI
Constructor and Description |
---|
EPAdministratorImpl(EPAdministratorContext adminContext)
Constructor - takes the services context as argument.
|
Modifier and Type | Method and Description |
---|---|
AnnotationPart |
compileAnnotationToSODA(String annotationExpression)
Compile annotation expressions.
|
EPStatementObjectModel |
compileEPL(String eplStatement)
Compiles a given EPL into an object model representation of the query.
|
StatementSpecRaw |
compileEPLToRaw(String epl) |
ExprNode |
compileExpression(String expression)
Compile expression.
|
Expression |
compileExpressionToSODA(String expression)
Compile expression.
|
MatchRecognizeRegEx |
compileMatchRecognizePatternToSODA(String matchRecogPatternExpression)
Compile match recognize pattern expression.
|
EvalFactoryNode |
compilePatternToNode(String pattern)
Compile pattern.
|
PatternExpr |
compilePatternToSODA(String expression)
Compile pattern.
|
EPStatementObjectModel |
compilePatternToSODAModel(String expression)
Compile pattern.
|
EPStatement |
create(EPPreparedStatement prepared)
Creates and starts a prepared statement.
|
EPStatement |
create(EPPreparedStatement prepared,
String statementName)
Creates and starts a prepared statement.
|
EPStatement |
create(EPPreparedStatement prepared,
String statementName,
Object userObject)
Creates and starts a prepared statement.
|
EPStatement |
create(EPPreparedStatement prepared,
String statementName,
Object userObject,
Integer optionalStatementId) |
EPStatement |
create(EPStatementObjectModel sodaStatement)
Creates and starts an EPL statement.
|
EPStatement |
create(EPStatementObjectModel sodaStatement,
String statementName)
Creates and starts an EPL statement.
|
EPStatement |
create(EPStatementObjectModel sodaStatement,
String statementName,
Object userObject)
Creates and starts an EPL statement.
|
EPStatement |
create(EPStatementObjectModel sodaStatement,
String statementName,
Object userObject,
Integer optionalStatementId) |
EPStatement |
createEPL(String eplStatement)
Creates and starts an EPL statement.
|
EPStatement |
createEPL(String eplStatement,
Object userObject)
Create and starts an EPL statement.
|
EPStatement |
createEPL(String eplStatement,
String statementName)
Create and starts an EPL statement.
|
EPStatement |
createEPL(String eplStatement,
String statementName,
Object userObject)
Create and starts an EPL statement.
|
EPStatement |
createEPLStatementId(String eplStatement,
String statementName,
Object userObject,
int statementId) |
EPStatement |
createModelStatementId(EPStatementObjectModel sodaStatement,
String statementName,
Object userObject,
int statementId) |
EPStatement |
createPattern(String onExpression)
Create and starts an event pattern statement for the expressing string passed.
|
EPStatement |
createPattern(String expression,
Object userObject)
Create and starts an event pattern statement for the expressing string passed and assign the name passed.
|
EPStatement |
createPattern(String expression,
String statementName)
Create and starts an event pattern statement for the expressing string passed and assign the name passed.
|
EPStatement |
createPattern(String expression,
String statementName,
Object userObject)
Create and starts an event pattern statement for the expressing string passed and assign the name passed.
|
EPStatement |
createPatternStatementId(String pattern,
String statementName,
Object userObject,
int statementId) |
EPStatement |
createPreparedEPLStatementId(EPPreparedStatementImpl prepared,
String statementName,
Object userObject,
int statementId) |
void |
destroy()
Destroys an engine instance.
|
void |
destroyAllStatements()
Stops and destroys all statements.
|
ConfigurationOperations |
getConfiguration()
Returns configuration operations for runtime engine configuration.
|
EPContextPartitionAdmin |
getContextPartitionAdmin()
Returns the administrative interface for context partitions.
|
EPDeploymentAdmin |
getDeploymentAdmin()
Returns deployment administrative services.
|
EPStatement |
getStatement(String name)
Returns the statement by the given statement name.
|
String |
getStatementNameForId(int statementId) |
String[] |
getStatementNames()
Returns the statement names of all started and stopped statements.
|
EPStatementObjectModel |
mapRawToSODA(StatementSpecRaw raw) |
StatementSpecRaw |
mapSODAToRaw(EPStatementObjectModel model) |
EPPreparedStatement |
prepareEPL(String eplExpression)
Prepares a statement for the given EPL, which can include substitution parameters marked via question mark '?'.
|
EPPreparedStatement |
preparePattern(String patternExpression)
Prepares a statement for the given pattern, which can include substitution parameters marked via question mark '?'.
|
void |
startAllStatements()
Starts all statements that are in stopped state.
|
void |
stopAllStatements()
Stops all statements that are in started state.
|
public EPAdministratorImpl(EPAdministratorContext adminContext)
adminContext
- - administrative contextpublic EPDeploymentAdmin getDeploymentAdmin()
EPAdministrator
getDeploymentAdmin
in interface EPAdministrator
public EPStatement createPattern(String onExpression) throws EPException
EPAdministrator
The engine assigns a unique name to the statement.
createPattern
in interface EPAdministrator
onExpression
- must follow the documented syntax for pattern statementsEPException
- when the expression was not validpublic EPStatement createEPL(String eplStatement) throws EPException
EPAdministrator
The engine assigns a unique name to the statement. The returned statement is in started state.
createEPL
in interface EPAdministrator
eplStatement
- is the query language statementEPException
- when the expression was not validpublic EPStatement createPattern(String expression, String statementName) throws EPException
EPAdministrator
The statement name is optimally a unique name. If a statement of the same name has already been created, the engine assigns a postfix to create a unique statement name.
createPattern
in interface EPAdministrator
expression
- must follow the documented syntax for pattern statementsstatementName
- is the name to assign to the statement for use in managing the statementEPException
- when the expression was not validpublic EPStatement createPattern(String expression, String statementName, Object userObject) throws EPException
EPAdministrator
The statement name is optimally a unique name. If a statement of the same name has already been created, the engine assigns a postfix to create a unique statement name.
Accepts an application defined user data object associated with the statement. The user object is a single, unnamed field that is stored with every statement. Applications may put arbitrary objects in this field or a null value.
createPattern
in interface EPAdministrator
expression
- must follow the documented syntax for pattern statementsstatementName
- is the name to assign to the statement for use in managing the statementuserObject
- is the application-defined user objectEPException
- when the expression was not validpublic EPStatement createEPL(String eplStatement, String statementName) throws EPException
EPAdministrator
The statement name is optimally a unique name. If a statement of the same name has already been created, the engine assigns a postfix to create a unique statement name.
createEPL
in interface EPAdministrator
eplStatement
- is the query language statementstatementName
- is the name to assign to the statement for use in managing the statementEPException
- when the expression was not validpublic EPStatement createEPLStatementId(String eplStatement, String statementName, Object userObject, int statementId) throws EPException
createEPLStatementId
in interface EPAdministratorSPI
EPException
public EPStatement createEPL(String eplStatement, String statementName, Object userObject) throws EPException
EPAdministrator
The statement name is optimally a unique name. If a statement of the same name has already been created, the engine assigns a postfix to create a unique statement name.
Accepts an application defined user data object associated with the statement. The user object is a single, unnamed field that is stored with every statement. Applications may put arbitrary objects in this field or a null value.
createEPL
in interface EPAdministrator
eplStatement
- is the query language statementstatementName
- is the name to assign to the statement for use in managing the statementuserObject
- is the application-defined user objectEPException
- when the expression was not validpublic EPStatement createPattern(String expression, Object userObject) throws EPException
EPAdministrator
Accepts an application defined user data object associated with the statement. The user object is a single, unnamed field that is stored with every statement. Applications may put arbitrary objects in this field or a null value.
createPattern
in interface EPAdministrator
expression
- must follow the documented syntax for pattern statementsuserObject
- is the application-defined user objectEPException
- when the expression was not validpublic EPStatement createPatternStatementId(String pattern, String statementName, Object userObject, int statementId) throws EPException
createPatternStatementId
in interface EPAdministratorSPI
EPException
public EPStatement createEPL(String eplStatement, Object userObject) throws EPException
EPAdministrator
Accepts an application defined user data object associated with the statement. The user object is a single, unnamed field that is stored with every statement. Applications may put arbitrary objects in this field or a null value.
createEPL
in interface EPAdministrator
eplStatement
- is the query language statementuserObject
- is the application-defined user objectEPException
- when the expression was not validpublic EPStatement create(EPStatementObjectModel sodaStatement) throws EPException
EPAdministrator
create
in interface EPAdministrator
sodaStatement
- is the statement object modelEPException
- when the expression was not validpublic EPStatement createModelStatementId(EPStatementObjectModel sodaStatement, String statementName, Object userObject, int statementId) throws EPException
createModelStatementId
in interface EPAdministratorSPI
EPException
public EPStatement create(EPStatementObjectModel sodaStatement, String statementName, Object userObject) throws EPException
EPAdministrator
The statement name is optimally a unique name. If a statement of the same name has already been created, the engine assigns a postfix to create a unique statement name.
Accepts an application defined user data object associated with the statement. The user object is a single, unnamed field that is stored with every statement. Applications may put arbitrary objects in this field or a null value.
create
in interface EPAdministrator
sodaStatement
- is the statement object modelstatementName
- is the name to assign to the statement for use in managing the statementuserObject
- is the application-defined user objectEPException
- when the expression was not validpublic EPStatement create(EPStatementObjectModel sodaStatement, String statementName, Object userObject, Integer optionalStatementId) throws EPException
EPException
public EPStatement create(EPStatementObjectModel sodaStatement, String statementName) throws EPException
EPAdministrator
The statement name is optimally a unique name. If a statement of the same name has already been created, the engine assigns a postfix to create a unique statement name.
create
in interface EPAdministrator
sodaStatement
- is the statement object modelstatementName
- is the name to assign to the statement for use in managing the statementEPException
- when the expression was not validpublic EPPreparedStatement prepareEPL(String eplExpression) throws EPException
EPAdministrator
prepareEPL
in interface EPAdministrator
eplExpression
- is the statement text to prepareEPException
- indicates compilation errors.public EPPreparedStatement preparePattern(String patternExpression) throws EPException
EPAdministrator
preparePattern
in interface EPAdministrator
patternExpression
- is the statement text to prepareEPException
- indicates compilation errors.public EPStatement create(EPPreparedStatement prepared, String statementName, Object userObject, Integer optionalStatementId) throws EPException
EPException
public EPStatement create(EPPreparedStatement prepared, String statementName) throws EPException
EPAdministrator
The statement name is optimally a unique name. If a statement of the same name has already been created, the engine assigns a postfix to create a unique statement name.
create
in interface EPAdministrator
prepared
- is the prepared statement for which all substitution values have been providedstatementName
- is the name to assign to the statement for use in managing the statementEPException
- when the prepared statement was not validpublic EPStatement create(EPPreparedStatement prepared, String statementName, Object userObject) throws EPException
EPAdministrator
The statement name is optimally a unique name. If a statement of the same name has already been created, the engine assigns a postfix to create a unique statement name.
Accepts an application defined user data object associated with the statement. The user object is a single, unnamed field that is stored with every statement. Applications may put arbitrary objects in this field or a null value.
create
in interface EPAdministrator
prepared
- is the prepared statement for which all substitution values have been providedstatementName
- is the name to assign to the statement for use in managing the statementuserObject
- is the application-defined user objectEPException
- when the prepared statement was not validpublic EPStatement createPreparedEPLStatementId(EPPreparedStatementImpl prepared, String statementName, Object userObject, int statementId) throws EPException
createPreparedEPLStatementId
in interface EPAdministratorSPI
EPException
public EPStatement create(EPPreparedStatement prepared) throws EPException
EPAdministrator
create
in interface EPAdministrator
prepared
- is the prepared statement for which all substitution values have been providedEPException
- when the expression was not validpublic EPStatementObjectModel compileEPL(String eplStatement) throws EPException
EPAdministrator
compileEPL
in interface EPAdministrator
eplStatement
- is the statement text to compileEPException
- indicates compilation errors.public EPStatement getStatement(String name)
EPAdministrator
getStatement
in interface EPAdministrator
name
- is the statement name to return the statement forpublic String getStatementNameForId(int statementId)
getStatementNameForId
in interface EPAdministratorSPI
public String[] getStatementNames()
EPAdministrator
This excludes the name of destroyed statements.
getStatementNames
in interface EPAdministrator
public void startAllStatements() throws EPException
EPAdministrator
startAllStatements
in interface EPAdministrator
EPException
- when an error occured starting statements.public void stopAllStatements() throws EPException
EPAdministrator
stopAllStatements
in interface EPAdministrator
EPException
- when an error occured stopping statementspublic void destroyAllStatements() throws EPException
EPAdministrator
destroyAllStatements
in interface EPAdministrator
EPException
- when an error occured stopping or destroying statementspublic ConfigurationOperations getConfiguration()
EPAdministrator
getConfiguration
in interface EPAdministrator
public void destroy()
destroy
in interface EPAdministratorSPI
public StatementSpecRaw compileEPLToRaw(String epl)
compileEPLToRaw
in interface EPAdministratorSPI
public EPStatementObjectModel mapRawToSODA(StatementSpecRaw raw)
mapRawToSODA
in interface EPAdministratorSPI
public StatementSpecRaw mapSODAToRaw(EPStatementObjectModel model)
mapSODAToRaw
in interface EPAdministratorSPI
public EvalFactoryNode compilePatternToNode(String pattern) throws EPException
EPAdministratorSPI
compilePatternToNode
in interface EPAdministratorSPI
pattern
- to compileEPException
- if compile failedpublic EPStatementObjectModel compilePatternToSODAModel(String expression) throws EPException
EPAdministratorSPI
compilePatternToSODAModel
in interface EPAdministratorSPI
expression
- to compileEPException
- if compile failedpublic ExprNode compileExpression(String expression) throws EPException
EPAdministratorSPI
compileExpression
in interface EPAdministratorSPI
expression
- to compileEPException
- if compile failedpublic Expression compileExpressionToSODA(String expression) throws EPException
EPAdministratorSPI
compileExpressionToSODA
in interface EPAdministratorSPI
expression
- to compileEPException
- if compile failedpublic PatternExpr compilePatternToSODA(String expression) throws EPException
EPAdministratorSPI
compilePatternToSODA
in interface EPAdministratorSPI
expression
- to compileEPException
- if compile failedpublic AnnotationPart compileAnnotationToSODA(String annotationExpression)
EPAdministratorSPI
compileAnnotationToSODA
in interface EPAdministratorSPI
annotationExpression
- to compilepublic MatchRecognizeRegEx compileMatchRecognizePatternToSODA(String matchRecogPatternExpression)
EPAdministratorSPI
compileMatchRecognizePatternToSODA
in interface EPAdministratorSPI
matchRecogPatternExpression
- to compilepublic EPContextPartitionAdmin getContextPartitionAdmin()
EPAdministrator
getContextPartitionAdmin
in interface EPAdministrator