com.espertech.esper.client
Interface ConfigurationOperations

All Known Implementing Classes:
Configuration, ConfigurationOperationsImpl

public interface ConfigurationOperations

Provides configuration operations for configuration-time and runtime parameters.


Method Summary
 void addEventType(java.lang.Class eventClass)
          Add a name for an event type represented by Java-bean plain-old Java object events, using the simple name of the Java class as the name.
 void addEventType(java.lang.String eventTypeName, java.lang.Class eventClass)
          Add an name for an event type represented by Java-bean plain-old Java object events.
 void addEventType(java.lang.String eventTypeName, ConfigurationEventTypeXMLDOM xmlDOMEventTypeDesc)
          Add an name for an event type that represents org.w3c.dom.Node events.
 void addEventType(java.lang.String eventTypeName, java.util.Map<java.lang.String,java.lang.Object> typeMap)
          Add an name for an event type that represents java.util.Map events, and for which each property may itself be a Map of further properties, with unlimited nesting levels.
 void addEventType(java.lang.String eventTypeName, java.util.Map<java.lang.String,java.lang.Object> typeMap, ConfigurationEventTypeMap mapConfig)
          Add a name for an event type that represents java.util.Map events, and for which each property may itself be a Map of further properties, with unlimited nesting levels.
 void addEventType(java.lang.String eventTypeName, java.util.Map<java.lang.String,java.lang.Object> typeMap, java.lang.String[] superTypes)
          Add a name for an event type that represents java.util.Map events, and for which each property may itself be a Map of further properties, with unlimited nesting levels.
 void addEventType(java.lang.String eventTypeName, java.util.Properties typeMap)
          Add an event type that represents java.util.Map events.
 void addEventType(java.lang.String eventTypeName, java.lang.String eventClassName)
          Add an name for an event type represented by JavaBean object events.
 void addEventType(java.lang.String eventTypeName, java.lang.String[] propertyNames, java.lang.Object[] propertyTypes)
          Add an event type that represents Object-array (Object[]) events.
 void addEventType(java.lang.String eventTypeName, java.lang.String[] propertyNames, java.lang.Object[] propertyTypes, ConfigurationEventTypeObjectArray optionalConfiguration)
          Add an event type that represents Object-array (Object[]) events.
 void addEventType(java.lang.String eventTypeName, java.lang.String eventClass, ConfigurationEventTypeLegacy legacyEventTypeDesc)
          Add an name for an event type that represents legacy Java type (non-JavaBean style) events.
 void addEventTypeAutoName(java.lang.String packageName)
          Adds a Java package name of a package that Java event classes reside in.
 void addImport(java.lang.Class importClass)
          Adds a class to the list of automatically-imported classes.
 void addImport(java.lang.String importName)
          Adds a package or class to the list of automatically-imported classes and packages.
 void addPlugInAggregationFunctionFactory(java.lang.String functionName, java.lang.String aggregationFactoryClassName)
          Adds a plug-in aggregation function given a EPL function name and an aggregation factory class name.
 void addPlugInAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction config)
          Adds a plug-in aggregation multi-function.
 void addPlugInEventType(java.lang.String eventTypeName, java.net.URI[] resolutionURIs, java.io.Serializable initializer)
          Adds an name for an event type that one of the plug-in event representations resolves to an event type.
 void addPlugInSingleRowFunction(java.lang.String functionName, java.lang.String className, java.lang.String methodName)
          Adds a plug-in single-row function given a EPL function name, a class name and a method name.
 void addPlugInSingleRowFunction(java.lang.String functionName, java.lang.String className, java.lang.String methodName, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable)
          Adds a plug-in single-row function given a EPL function name, a class name, method name and setting for value-cache behavior.
 void addPlugInSingleRowFunction(java.lang.String functionName, java.lang.String className, java.lang.String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache)
          Adds a plug-in single-row function given a EPL function name, a class name, method name and setting for value-cache behavior.
 void addPlugInSingleRowFunction(java.lang.String functionName, java.lang.String className, java.lang.String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable, boolean rethrowExceptions)
          Adds a plug-in single-row function given a EPL function name, a class name, method name and setting for value-cache behavior.
 void addPlugInView(java.lang.String namespace, java.lang.String name, java.lang.String viewFactoryClass)
          Add a new plug-in view for use as a data window or derived value view.
 void addRevisionEventType(java.lang.String revisioneventTypeName, ConfigurationRevisionEventType revisionEventTypeConfig)
          Adds an revision event type.
 void addVariable(java.lang.String variableName, java.lang.Class type, java.lang.Object initializationValue)
          Add a global variable.
 void addVariable(java.lang.String variableName, java.lang.String type, java.lang.Object initializationValue)
          Add a global variable.
 void addVariable(java.lang.String variableName, java.lang.String type, java.lang.Object initializationValue, boolean constant)
          Add a global variable, allowing constants.
 void addVariantStream(java.lang.String variantStreamName, ConfigurationVariantStream variantStreamConfig)
          Adds a new variant stream.
 EventType getEventType(java.lang.String eventTypeName)
          Returns the event type for a given event type name.
 java.util.Set<java.lang.String> getEventTypeNameUsedBy(java.lang.String eventTypeName)
          Return the set of statement names of statements that are in started or stopped state and that reference the given event type name.
 EventType[] getEventTypes()
          Returns an array of event types tracked or available within the engine in any order.
 java.util.Set<java.lang.String> getVariableNameUsedBy(java.lang.String variableName)
          Return the set of statement names of statements that are in started or stopped state and that reference the given variable name.
 boolean isEventTypeExists(java.lang.String eventTypeName)
          Checks if an eventTypeName has already been registered for that name.
 boolean isVariantStreamExists(java.lang.String name)
          Returns true if a variant stream by the name has been declared, or false if not.
 boolean removeEventType(java.lang.String name, boolean force)
          Remove an event type by its name, returning an indicator whether the event type was found and removed.
 boolean removeVariable(java.lang.String name, boolean force)
          Remove a global non-context-partitioned variable by its name, returning an indicator whether the variable was found and removed.
 void replaceXMLEventType(java.lang.String xmlEventTypeName, ConfigurationEventTypeXMLDOM config)
          Rebuild the XML event type based on changed type informaton, please read below for limitations.
 void setMetricsReportingDisabled()
          Disable engine-level metrics reporting.
 void setMetricsReportingEnabled()
          Enable engine-level metrics reporting.
 void setMetricsReportingInterval(java.lang.String stmtGroupName, long newIntervalMSec)
          Sets a new interval for metrics reporting for a pre-configured statement group, or changes the default statement reporting interval if supplying a null value for the statement group name.
 void setMetricsReportingStmtDisabled(java.lang.String statementName)
          Disable metrics reporting for a given statement.
 void setMetricsReportingStmtEnabled(java.lang.String statementName)
          Enable metrics reporting for the given statement.
 void setPatternMaxSubexpressions(java.lang.Long maxSubexpressions)
          Set the current maximum pattern sub-expression count.
 void setPlugInEventTypeResolutionURIs(java.net.URI[] urisToResolveName)
          Sets the URIs that point to plug-in event representations that are given a chance to dynamically resolve an event type name to an event type, when a new (unseen) event type name occurs in a new EPL statement.
 void updateMapEventType(java.lang.String mapeventTypeName, java.util.Map<java.lang.String,java.lang.Object> typeMap)
          Updates an existing Map event type with additional properties.
 void updateObjectArrayEventType(java.lang.String myEvent, java.lang.String[] namesNew, java.lang.Object[] typesNew)
          Updates an existing Object-array event type with additional properties.
 

Method Detail

addEventTypeAutoName

void addEventTypeAutoName(java.lang.String packageName)
Adds a Java package name of a package that Java event classes reside in.

This setting allows an application to place all it's events into one or more Java packages and then declare these packages via this method. The engine attempts to resolve an event type name to a Java class residing in each declared package.

For example, in the statement "select * from MyEvent" the engine attempts to load class "javaPackageName.MyEvent" and if successful, uses that class as the event type.

Parameters:
packageName - is the fully-qualified Java package name of the Java package that event classes reside in

addPlugInAggregationMultiFunction

void addPlugInAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction config)
                                       throws ConfigurationException
Adds a plug-in aggregation multi-function.

Parameters:
config - the configuration
Throws:
ConfigurationException - is thrown to indicate a configuration problem

addPlugInAggregationFunctionFactory

void addPlugInAggregationFunctionFactory(java.lang.String functionName,
                                         java.lang.String aggregationFactoryClassName)
                                         throws ConfigurationException
Adds a plug-in aggregation function given a EPL function name and an aggregation factory class name.

The same function name cannot be added twice.

Parameters:
functionName - is the new aggregation function name for use in EPL
aggregationFactoryClassName - is the fully-qualified class name of the class implementing the aggregation function factory interface AggregationFunctionFactory
Throws:
ConfigurationException - is thrown to indicate a problem adding the aggregation function

addPlugInSingleRowFunction

void addPlugInSingleRowFunction(java.lang.String functionName,
                                java.lang.String className,
                                java.lang.String methodName,
                                ConfigurationPlugInSingleRowFunction.ValueCache valueCache)
                                throws ConfigurationException
Adds a plug-in single-row function given a EPL function name, a class name, method name and setting for value-cache behavior.

The same function name cannot be added twice.

Parameters:
functionName - is the new single-row function name for use in EPL
className - is the fully-qualified class name of the class implementing the single-row function
methodName - is the public static method provided by the class that implements the single-row function
valueCache - set the behavior for caching the return value when constant parameters are provided
Throws:
ConfigurationException - is thrown to indicate a problem adding the single-row function

addPlugInSingleRowFunction

void addPlugInSingleRowFunction(java.lang.String functionName,
                                java.lang.String className,
                                java.lang.String methodName,
                                ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable)
                                throws ConfigurationException
Adds a plug-in single-row function given a EPL function name, a class name, method name and setting for value-cache behavior.

The same function name cannot be added twice.

Parameters:
functionName - is the new single-row function name for use in EPL
className - is the fully-qualified class name of the class implementing the single-row function
methodName - is the public static method provided by the class that implements the single-row function
filterOptimizable - whether the single-row function, when used in filters, may be subject to reverse index lookup based on the function result
Throws:
ConfigurationException - is thrown to indicate a problem adding the single-row function

addPlugInSingleRowFunction

void addPlugInSingleRowFunction(java.lang.String functionName,
                                java.lang.String className,
                                java.lang.String methodName)
                                throws ConfigurationException
Adds a plug-in single-row function given a EPL function name, a class name and a method name.

The same function name cannot be added twice.

Parameters:
functionName - is the new single-row function name for use in EPL
className - is the fully-qualified class name of the class implementing the single-row function
methodName - is the public static method provided by the class that implements the single-row function
Throws:
ConfigurationException - is thrown to indicate a problem adding the single-row function

addPlugInSingleRowFunction

void addPlugInSingleRowFunction(java.lang.String functionName,
                                java.lang.String className,
                                java.lang.String methodName,
                                ConfigurationPlugInSingleRowFunction.ValueCache valueCache,
                                ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable,
                                boolean rethrowExceptions)
                                throws ConfigurationException
Adds a plug-in single-row function given a EPL function name, a class name, method name and setting for value-cache behavior.

The same function name cannot be added twice.

Parameters:
functionName - is the new single-row function name for use in EPL
className - is the fully-qualified class name of the class implementing the single-row function
methodName - is the public static method provided by the class that implements the single-row function
valueCache - set the behavior for caching the return value when constant parameters are provided
filterOptimizable - whether the single-row function, when used in filters, may be subject to reverse index lookup based on the function result
rethrowExceptions - whether exceptions generated by the UDF are rethrown
Throws:
ConfigurationException - is thrown to indicate a problem adding the single-row function

addImport

void addImport(java.lang.String importName)
               throws ConfigurationException
Adds a package or class to the list of automatically-imported classes and packages.

To import a single class offering a static method, simply supply the fully-qualified name of the class and use the syntax classname.methodname(...)

To import a whole package and use the classname.methodname(...) syntax, specifiy a package with wildcard, such as com.mycompany.staticlib.*.

Parameters:
importName - is a fully-qualified class name or a package name with wildcard
Throws:
ConfigurationException - if incorrect package or class names are encountered

addImport

void addImport(java.lang.Class importClass)
               throws ConfigurationException
Adds a class to the list of automatically-imported classes.

Use #addImport(String) to import a package.

Parameters:
importClass - is a class to import
Throws:
ConfigurationException - if incorrect package or class names are encountered

isEventTypeExists

boolean isEventTypeExists(java.lang.String eventTypeName)
Checks if an eventTypeName has already been registered for that name.

Parameters:
eventTypeName - the name
Returns:
true if already registered
Since:
2.1

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.lang.String eventClassName)
                  throws ConfigurationException
Add an name for an event type represented by JavaBean object events.

Allows a second name to be added for the same type. Does not allow the same name to be used for different types.

Note that when adding multiple names for the same Java class the names represent an alias to the same event type since event type identity for Java classes is per Java class.

Parameters:
eventTypeName - is the name for the event type
eventClassName - fully-qualified class name of the event type
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.lang.Class eventClass)
                  throws ConfigurationException
Add an name for an event type represented by Java-bean plain-old Java object events.

Allows a second name to be added for the same type. Does not allow the same name to be used for different types.

Note that when adding multiple names for the same Java class the names represent an alias to the same event type since event type identity for Java classes is per Java class.

Parameters:
eventTypeName - is the name for the event type
eventClass - is the Java event class for which to create the name
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.Class eventClass)
Add a name for an event type represented by Java-bean plain-old Java object events, using the simple name of the Java class as the name.

For example, if your class is "com.mycompany.MyEvent", then this method adds the name "MyEvent" for the class.

Allows a second name to be added for the same type. Does not allow the same name to be used for different types.

Parameters:
eventClass - is the Java event class for which to create the name from the class simple name
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.util.Properties typeMap)
                  throws ConfigurationException
Add an event type that represents java.util.Map events.

Allows a second name to be added for the same type. Does not allow the same name to be used for different types.

Parameters:
eventTypeName - is the name for the event type
typeMap - maps the name of each property in the Map event to the type (fully qualified classname) of its value in Map event instances.
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.lang.String[] propertyNames,
                  java.lang.Object[] propertyTypes)
                  throws ConfigurationException
Add an event type that represents Object-array (Object[]) events.

Parameters:
eventTypeName - is the name for the event type
propertyNames - name of each property, length must match number of types
propertyTypes - type of each property, length must match number of names
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.lang.String[] propertyNames,
                  java.lang.Object[] propertyTypes,
                  ConfigurationEventTypeObjectArray optionalConfiguration)
                  throws ConfigurationException
Add an event type that represents Object-array (Object[]) events.

Parameters:
eventTypeName - is the name for the event type
propertyNames - name of each property, length must match number of types
propertyTypes - type of each property, length must match number of names
optionalConfiguration - object-array type configuration
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.util.Map<java.lang.String,java.lang.Object> typeMap)
                  throws ConfigurationException
Add an name for an event type that represents java.util.Map events, and for which each property may itself be a Map of further properties, with unlimited nesting levels.

Each entry in the type mapping must contain the String property name as the key value, and either a Class, or a further Map, or the name of another previously-register Map event type (append [] for array of Map).

Parameters:
eventTypeName - is the name for the event type
typeMap - maps the name of each property in the Map event to the type (fully qualified classname) of its value in Map event instances.
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.util.Map<java.lang.String,java.lang.Object> typeMap,
                  java.lang.String[] superTypes)
                  throws ConfigurationException
Add a name for an event type that represents java.util.Map events, and for which each property may itself be a Map of further properties, with unlimited nesting levels.

Each entry in the type mapping must contain the String property name as the key value, and either a Class, or a further Map, or the name of another previously-register Map event type (append [] for array of Map).

Parameters:
eventTypeName - is the name for the event type
typeMap - maps the name of each property in the Map event to the type (fully qualified classname) of its value in Map event instances.
superTypes - is an array of event type name of further Map types that this
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.util.Map<java.lang.String,java.lang.Object> typeMap,
                  ConfigurationEventTypeMap mapConfig)
                  throws ConfigurationException
Add a name for an event type that represents java.util.Map events, and for which each property may itself be a Map of further properties, with unlimited nesting levels.

Each entry in the type mapping must contain the String property name as the key value, and either a Class, or a further Map, or the name of another previously-register Map event type (append [] for array of Map).

Parameters:
eventTypeName - is the name for the event type
typeMap - maps the name of each property in the Map event to the type (fully qualified classname) of its value in Map event instances.
mapConfig - is the Map-event type configuration that may defined super-types, timestamp-property-name etc.
Throws:
ConfigurationException - if the name is already in used for a different type

addEventType

void addEventType(java.lang.String eventTypeName,
                  ConfigurationEventTypeXMLDOM xmlDOMEventTypeDesc)
                  throws ConfigurationException
Add an name for an event type that represents org.w3c.dom.Node events.

Allows a second name to be added for the same type. Does not allow the same name to be used for different types.

Parameters:
eventTypeName - is the name for the event type
xmlDOMEventTypeDesc - descriptor containing property and mapping information for XML-DOM events
Throws:
ConfigurationException - if the name is already in used for a different type

addVariable

void addVariable(java.lang.String variableName,
                 java.lang.Class type,
                 java.lang.Object initializationValue)
                 throws ConfigurationException
Add a global variable.

Use the runtime API to set variable values or EPL statements to change variable values.

Parameters:
variableName - name of the variable to add
type - the type name of the variable, must be a primitive or boxed Java-builtin scalar type or "object" for any value or an event type name or a class name or fully-qualified class name. Append "[]" for array.
initializationValue - is the first assigned value. For static initialization via the Configuration object the value can be string-typed and will be parsed. For static initialization the initialization value, if provided, must implement Serializable or Externalizable.
Throws:
ConfigurationException - if the type and initialization value don't match or the variable name is already in use

addVariable

void addVariable(java.lang.String variableName,
                 java.lang.String type,
                 java.lang.Object initializationValue)
                 throws ConfigurationException
Add a global variable.

Use the runtime API to set variable values or EPL statements to change variable values.

Parameters:
variableName - name of the variable to add
type - the type name of the variable, must be a primitive or boxed Java-builtin scalar type or "object" for any value or an event type name or a class name or fully-qualified class name. Append "[]" for array.
initializationValue - is the first assigned value For static initialization via the Configuration object the value can be string-typed and will be parsed. For static initialization the initialization value, if provided, must implement Serializable or Externalizable.
Throws:
ConfigurationException - if the type and initialization value don't match or the variable name is already in use

addVariable

void addVariable(java.lang.String variableName,
                 java.lang.String type,
                 java.lang.Object initializationValue,
                 boolean constant)
                 throws ConfigurationException
Add a global variable, allowing constants.

Use the runtime API to set variable values or EPL statements to change variable values.

Parameters:
variableName - name of the variable to add
type - the type name of the variable, must be a primitive or boxed Java-builtin scalar type or "object" for any value or an event type name or a class name or fully-qualified class name. Append "[]" for array.
initializationValue - is the first assigned value For static initialization via the Configuration object the value can be string-typed and will be parsed. For static initialization the initialization value, if provided, must implement Serializable or Externalizable.
constant - true to identify the variable as a constant
Throws:
ConfigurationException - if the type and initialization value don't match or the variable name is already in use

addPlugInEventType

void addPlugInEventType(java.lang.String eventTypeName,
                        java.net.URI[] resolutionURIs,
                        java.io.Serializable initializer)
Adds an name for an event type that one of the plug-in event representations resolves to an event type.

The order of the URIs matters as event representations are asked in turn, to accept the event type.

URIs can be child URIs of plug-in event representations and can add additional parameters or fragments for use by the event representation.

Parameters:
eventTypeName - is the name of the event type
resolutionURIs - is URIs that are matched to registered event representations
initializer - is an optional value for parameterizing or configuring the event type

setPlugInEventTypeResolutionURIs

void setPlugInEventTypeResolutionURIs(java.net.URI[] urisToResolveName)
Sets the URIs that point to plug-in event representations that are given a chance to dynamically resolve an event type name to an event type, when a new (unseen) event type name occurs in a new EPL statement.

The order of the URIs matters as event representations are asked in turn, to accept the name.

URIs can be child URIs of plug-in event representations and can add additional parameters or fragments for use by the event representation.

Parameters:
urisToResolveName - URIs for resolving the name

addRevisionEventType

void addRevisionEventType(java.lang.String revisioneventTypeName,
                          ConfigurationRevisionEventType revisionEventTypeConfig)
Adds an revision event type. The name of the event type may be used with named windows to indicate that updates or new versions of events are processed.

Parameters:
revisioneventTypeName - the name of the revision event type
revisionEventTypeConfig - the configuration

addVariantStream

void addVariantStream(java.lang.String variantStreamName,
                      ConfigurationVariantStream variantStreamConfig)
Adds a new variant stream. Variant streams allow events of disparate types to be treated the same.

Parameters:
variantStreamName - is the name of the variant stream
variantStreamConfig - the configuration such as variant type names and any-type setting

updateMapEventType

void updateMapEventType(java.lang.String mapeventTypeName,
                        java.util.Map<java.lang.String,java.lang.Object> typeMap)
                        throws ConfigurationException
Updates an existing Map event type with additional properties.

Does not update existing properties of the updated Map event type.

Adds additional nested properties to nesting levels, if any.

Each entry in the type mapping must contain the String property name of the additional property and either a Class or further Map value for nested properties.

Map event types can only be updated at runtime, at configuration time updates are not allowed.

The type Map may list previously declared properties or can also contain only the new properties to be added.

Parameters:
mapeventTypeName - the name of the map event type to update
typeMap - a Map of string property name and type
Throws:
ConfigurationException - if the event type name could not be found or is not a Map

isVariantStreamExists

boolean isVariantStreamExists(java.lang.String name)
Returns true if a variant stream by the name has been declared, or false if not.

Parameters:
name - of variant stream
Returns:
indicator whether the variant stream by that name exists

setMetricsReportingInterval

void setMetricsReportingInterval(java.lang.String stmtGroupName,
                                 long newIntervalMSec)
                                 throws ConfigurationException
Sets a new interval for metrics reporting for a pre-configured statement group, or changes the default statement reporting interval if supplying a null value for the statement group name.

Parameters:
stmtGroupName - name of statement group, provide a null value for the default statement interval (default group)
newIntervalMSec - millisecond interval, use zero or negative value to disable
Throws:
ConfigurationException - if the statement group cannot be found

setMetricsReportingStmtEnabled

void setMetricsReportingStmtEnabled(java.lang.String statementName)
                                    throws ConfigurationException
Enable metrics reporting for the given statement.

This operation can only be performed at runtime and is not available at engine initialization time.

Statement metric reporting follows the configured default or statement group interval.

Only if metrics reporting (on the engine level) has been enabled at initialization time can statement-level metrics reporting be enabled through this method.

Parameters:
statementName - for which to enable metrics reporting
Throws:
ConfigurationException - if the statement cannot be found

setMetricsReportingStmtDisabled

void setMetricsReportingStmtDisabled(java.lang.String statementName)
                                     throws ConfigurationException
Disable metrics reporting for a given statement.

Parameters:
statementName - for which to disable metrics reporting
Throws:
ConfigurationException - if the statement cannot be found

setMetricsReportingEnabled

void setMetricsReportingEnabled()
                                throws ConfigurationException
Enable engine-level metrics reporting.

Use this operation to control, at runtime, metrics reporting globally.

Only if metrics reporting (on the engine level) has been enabled at initialization time can metrics reporting be re-enabled at runtime through this method.

Throws:
ConfigurationException - if use at runtime and metrics reporting had not been enabled at initialization time

setMetricsReportingDisabled

void setMetricsReportingDisabled()
                                 throws ConfigurationException
Disable engine-level metrics reporting.

Use this operation to control, at runtime, metrics reporting globally. Setting metrics reporting to disabled removes all performance cost for metrics reporting.

Throws:
ConfigurationException - if use at runtime and metrics reporting had not been enabled at initialization time

removeEventType

boolean removeEventType(java.lang.String name,
                        boolean force)
                        throws ConfigurationException
Remove an event type by its name, returning an indicator whether the event type was found and removed.

This method deletes the event type by it's name from the memory of the engine, thereby allowing that the name to be reused for a new event type and disallowing new statements that attempt to use the deleted name.

If there are one or more statements in started or stopped state that reference the event type, this operation throws ConfigurationException unless the force flag is passed.

If using the force flag to remove the type while statements use the type, the exact behavior of the engine depends on the event representation of the deleted event type and is thus not well defined. It is recommended to destroy statements that use the type before removing the type. Use #geteventTypeNameUsedBy to obtain a list of statements that use a type.

The method can be used for event types implicitly created for insert-into streams and for named windows. The method does not remove variant streams and does not remove revision event types.

Parameters:
name - the name of the event type to remove
force - false to include a check that the type is no longer in use, true to force the remove even though there can be one or more statements relying on that type
Returns:
indicator whether the event type was found and removed
Throws:
ConfigurationException - thrown to indicate that the remove operation failed

getEventTypeNameUsedBy

java.util.Set<java.lang.String> getEventTypeNameUsedBy(java.lang.String eventTypeName)
Return the set of statement names of statements that are in started or stopped state and that reference the given event type name.

A reference counts as any mention of the event type in a from-clause, a pattern, a insert-into or as part of on-trigger.

Parameters:
eventTypeName - name of the event type
Returns:
statement names referencing that type

getVariableNameUsedBy

java.util.Set<java.lang.String> getVariableNameUsedBy(java.lang.String variableName)
Return the set of statement names of statements that are in started or stopped state and that reference the given variable name.

A reference counts as any mention of the variable in any expression.

Parameters:
variableName - name of the variable
Returns:
statement names referencing that variable

removeVariable

boolean removeVariable(java.lang.String name,
                       boolean force)
                       throws ConfigurationException
Remove a global non-context-partitioned variable by its name, returning an indicator whether the variable was found and removed.

This method deletes the variable by it's name from the memory of the engine, thereby allowing that the name to be reused for a new variable and disallowing new statements that attempt to use the deleted name.

If there are one or more statements in started or stopped state that reference the variable, this operation throws ConfigurationException unless the force flag is passed.

If using the force flag to remove the variable while statements use the variable, the exact behavior is not well defined and affected statements may log errors. It is recommended to destroy statements that use the variable before removing the variable. Use #getVariableNameUsedBy to obtain a list of statements that use a variable.

Parameters:
name - the name of the variable to remove
force - false to include a check that the variable is no longer in use, true to force the remove even though there can be one or more statements relying on that variable
Returns:
indicator whether the variable was found and removed
Throws:
ConfigurationException - thrown to indicate that the remove operation failed

replaceXMLEventType

void replaceXMLEventType(java.lang.String xmlEventTypeName,
                         ConfigurationEventTypeXMLDOM config)
                         throws ConfigurationException
Rebuild the XML event type based on changed type informaton, please read below for limitations.

Your application must ensure that the rebuild type information is compatible with existing EPL statements and existing events.

The method can be used to change XPath expressions of existing attributes and to reload the schema and to add attributes.

It is not recommended to remove attributes, change attribute type or change the root element name or namespace, or to change type configuration other then as above.

If an existing EPL statement exists that refers to the event type then changes to the event type do not become visible for those existing statements.

Parameters:
xmlEventTypeName - the name of the XML event type
config - the new type configuration
Throws:
ConfigurationException - thrown when the type information change failed

getEventType

EventType getEventType(java.lang.String eventTypeName)
Returns the event type for a given event type name. Returns null if a type by that name does not exist.

This operation is not available for static configuration and is only available for runtime use.

Parameters:
eventTypeName - to return event type for
Returns:
event type or null if a type by that name does not exists

getEventTypes

EventType[] getEventTypes()
Returns an array of event types tracked or available within the engine in any order. Included are all application-configured or EPL-created schema types as well as dynamically-allocated stream's event types or types otherwise known to the engine as a dependeny type or supertype to another type.

Event types that are associated to statement output may not necessarily be returned as such types, depending on the statement, are considered anonymous.

This operation is not available for static configuration and is only available for runtime use.

Returns:
event type array

addEventType

void addEventType(java.lang.String eventTypeName,
                  java.lang.String eventClass,
                  ConfigurationEventTypeLegacy legacyEventTypeDesc)
Add an name for an event type that represents legacy Java type (non-JavaBean style) events.

This operation cannot be used to change an existing type.

Note that when adding multiple names for the same Java class the names represent an alias to the same event type since event type identity for Java classes is per Java class.

Parameters:
eventTypeName - is the name for the event type
eventClass - fully-qualified class name of the event type
legacyEventTypeDesc - descriptor containing property and mapping information for Legacy Java type events

addPlugInView

void addPlugInView(java.lang.String namespace,
                   java.lang.String name,
                   java.lang.String viewFactoryClass)
Add a new plug-in view for use as a data window or derived value view.

Parameters:
namespace - view namespace name
name - view name
viewFactoryClass - factory class of view

setPatternMaxSubexpressions

void setPatternMaxSubexpressions(java.lang.Long maxSubexpressions)
Set the current maximum pattern sub-expression count.

Use null to indicate that there is not current maximum.

Parameters:
maxSubexpressions - to set

updateObjectArrayEventType

void updateObjectArrayEventType(java.lang.String myEvent,
                                java.lang.String[] namesNew,
                                java.lang.Object[] typesNew)
Updates an existing Object-array event type with additional properties.

Does not update existing properties of the updated Object-array event type.

Adds additional nested properties to nesting levels, if any.

Object-array event types can only be updated at runtime, at configuration time updates are not allowed.

The type properties may list previously declared properties or can also contain only the new properties to be added.

Parameters:
myEvent - the name of the object-array event type to update
namesNew - property names
typesNew - property types
Throws:
ConfigurationException - if the event type name could not be found or is not a Map

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com