com.espertech.esper.core.service
Class ConfigurationOperationsImpl

java.lang.Object
  extended by com.espertech.esper.core.service.ConfigurationOperationsImpl
All Implemented Interfaces:
ConfigurationOperations

public class ConfigurationOperationsImpl
extends java.lang.Object
implements ConfigurationOperations

Provides runtime engine configuration operations.


Constructor Summary
ConfigurationOperationsImpl(EventAdapterService eventAdapterService, EventTypeIdGenerator eventTypeIdGenerator, EngineImportService engineImportService, VariableService variableService, EngineSettingsService engineSettingsService, ValueAddEventService valueAddEventService, MetricReportingService metricReportingService, StatementEventTypeRef statementEventTypeRef, StatementVariableRef statementVariableRef, PluggableObjectCollection plugInViews, FilterService filterService, PatternSubexpressionPoolEngineSvc patternSubexpressionPoolSvc, TableService tableService)
          Ctor.
 
Method Summary
 void addEventType(java.lang.Class javaEventClass)
          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 javaEventClass)
          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 javaEventClassName)
          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 javaPackageName)
          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 eventTypeName, 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 varianteventTypeName, 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 name)
          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 newInterval)
          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 objectArrayEventTypeName, java.lang.String[] propertyNames, java.lang.Object[] propertyTypes)
          Updates an existing Object-array event type with additional properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationOperationsImpl

public ConfigurationOperationsImpl(EventAdapterService eventAdapterService,
                                   EventTypeIdGenerator eventTypeIdGenerator,
                                   EngineImportService engineImportService,
                                   VariableService variableService,
                                   EngineSettingsService engineSettingsService,
                                   ValueAddEventService valueAddEventService,
                                   MetricReportingService metricReportingService,
                                   StatementEventTypeRef statementEventTypeRef,
                                   StatementVariableRef statementVariableRef,
                                   PluggableObjectCollection plugInViews,
                                   FilterService filterService,
                                   PatternSubexpressionPoolEngineSvc patternSubexpressionPoolSvc,
                                   TableService tableService)
Ctor.

Parameters:
eventAdapterService - is the event wrapper and type service
engineImportService - for imported aggregation functions and static functions
variableService - - provides access to variable values
engineSettingsService - - some engine settings are writable
valueAddEventService - - update event handling
metricReportingService - - for metric reporting
statementEventTypeRef - - statement to event type reference holding
statementVariableRef - - statement to variable reference holding
Method Detail

addEventTypeAutoName

public void addEventTypeAutoName(java.lang.String javaPackageName)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addEventTypeAutoName in interface ConfigurationOperations
Parameters:
javaPackageName - is the fully-qualified Java package name of the Java package that event classes reside in

addPlugInView

public void addPlugInView(java.lang.String namespace,
                          java.lang.String name,
                          java.lang.String viewFactoryClass)
Description copied from interface: ConfigurationOperations
Add a new plug-in view for use as a data window or derived value view.

Specified by:
addPlugInView in interface ConfigurationOperations
Parameters:
namespace - view namespace name
name - view name
viewFactoryClass - factory class of view

addPlugInAggregationMultiFunction

public void addPlugInAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction config)
                                       throws ConfigurationException
Description copied from interface: ConfigurationOperations
Adds a plug-in aggregation multi-function.

Specified by:
addPlugInAggregationMultiFunction in interface ConfigurationOperations
Parameters:
config - the configuration
Throws:
ConfigurationException - is thrown to indicate a configuration problem

addPlugInAggregationFunctionFactory

public void addPlugInAggregationFunctionFactory(java.lang.String functionName,
                                                java.lang.String aggregationFactoryClassName)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addPlugInAggregationFunctionFactory in interface ConfigurationOperations
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

addPlugInSingleRowFunction

public void addPlugInSingleRowFunction(java.lang.String functionName,
                                       java.lang.String className,
                                       java.lang.String methodName)
                                throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
addPlugInSingleRowFunction in interface ConfigurationOperations
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

public void addPlugInSingleRowFunction(java.lang.String functionName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       ConfigurationPlugInSingleRowFunction.ValueCache valueCache)
                                throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
addPlugInSingleRowFunction in interface ConfigurationOperations
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

public void addPlugInSingleRowFunction(java.lang.String functionName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable)
                                throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
addPlugInSingleRowFunction in interface ConfigurationOperations
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

public void addPlugInSingleRowFunction(java.lang.String functionName,
                                       java.lang.String className,
                                       java.lang.String methodName,
                                       ConfigurationPlugInSingleRowFunction.ValueCache valueCache,
                                       ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable,
                                       boolean rethrowExceptions)
                                throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
addPlugInSingleRowFunction in interface ConfigurationOperations
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

public void addImport(java.lang.String importName)
Description copied from interface: ConfigurationOperations
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.*.

Specified by:
addImport in interface ConfigurationOperations
Parameters:
importName - is a fully-qualified class name or a package name with wildcard

addImport

public void addImport(java.lang.Class importClass)
Description copied from interface: ConfigurationOperations
Adds a class to the list of automatically-imported classes.

Use #addImport(String) to import a package.

Specified by:
addImport in interface ConfigurationOperations
Parameters:
importClass - is a class to import

isEventTypeExists

public boolean isEventTypeExists(java.lang.String eventTypeName)
Description copied from interface: ConfigurationOperations
Checks if an eventTypeName has already been registered for that name.

Specified by:
isEventTypeExists in interface ConfigurationOperations
Parameters:
eventTypeName - the name
Returns:
true if already registered

addEventType

public void addEventType(java.lang.String eventTypeName,
                         java.lang.String javaEventClassName)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addEventType in interface ConfigurationOperations
Parameters:
eventTypeName - is the name for the event type
javaEventClassName - fully-qualified class name of the event type

addEventType

public void addEventType(java.lang.String eventTypeName,
                         java.lang.Class javaEventClass)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addEventType in interface ConfigurationOperations
Parameters:
eventTypeName - is the name for the event type
javaEventClass - is the Java event class for which to create the name

addEventType

public void addEventType(java.lang.Class javaEventClass)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addEventType in interface ConfigurationOperations
Parameters:
javaEventClass - is the Java event class for which to create the name from the class simple name

addEventType

public void addEventType(java.lang.String eventTypeName,
                         java.util.Properties typeMap)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addEventType in interface ConfigurationOperations
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.

addEventType

public void addEventType(java.lang.String eventTypeName,
                         java.util.Map<java.lang.String,java.lang.Object> typeMap)
Description copied from interface: ConfigurationOperations
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).

Specified by:
addEventType in interface ConfigurationOperations
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.

addEventType

public void addEventType(java.lang.String eventTypeName,
                         java.util.Map<java.lang.String,java.lang.Object> typeMap,
                         java.lang.String[] superTypes)
                  throws ConfigurationException
Description copied from interface: ConfigurationOperations
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).

Specified by:
addEventType in interface ConfigurationOperations
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

public void addEventType(java.lang.String eventTypeName,
                         java.util.Map<java.lang.String,java.lang.Object> typeMap,
                         ConfigurationEventTypeMap mapConfig)
                  throws ConfigurationException
Description copied from interface: ConfigurationOperations
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).

Specified by:
addEventType in interface ConfigurationOperations
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

public void addEventType(java.lang.String eventTypeName,
                         java.lang.String[] propertyNames,
                         java.lang.Object[] propertyTypes)
                  throws ConfigurationException
Description copied from interface: ConfigurationOperations
Add an event type that represents Object-array (Object[]) events.

Specified by:
addEventType in interface ConfigurationOperations
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

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

Specified by:
addEventType in interface ConfigurationOperations
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

public void addEventType(java.lang.String eventTypeName,
                         ConfigurationEventTypeXMLDOM xmlDOMEventTypeDesc)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addEventType in interface ConfigurationOperations
Parameters:
eventTypeName - is the name for the event type
xmlDOMEventTypeDesc - descriptor containing property and mapping information for XML-DOM events

addVariable

public void addVariable(java.lang.String variableName,
                        java.lang.Class type,
                        java.lang.Object initializationValue)
                 throws ConfigurationException
Description copied from interface: ConfigurationOperations
Add a global variable.

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

Specified by:
addVariable in interface ConfigurationOperations
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

public void addVariable(java.lang.String variableName,
                        java.lang.String eventTypeName,
                        java.lang.Object initializationValue)
                 throws ConfigurationException
Description copied from interface: ConfigurationOperations
Add a global variable.

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

Specified by:
addVariable in interface ConfigurationOperations
Parameters:
variableName - name of the variable to add
eventTypeName - 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

public void addVariable(java.lang.String variableName,
                        java.lang.String type,
                        java.lang.Object initializationValue,
                        boolean constant)
                 throws ConfigurationException
Description copied from interface: ConfigurationOperations
Add a global variable, allowing constants.

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

Specified by:
addVariable in interface ConfigurationOperations
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

public void addPlugInEventType(java.lang.String eventTypeName,
                               java.net.URI[] resolutionURIs,
                               java.io.Serializable initializer)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addPlugInEventType in interface ConfigurationOperations
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

public void setPlugInEventTypeResolutionURIs(java.net.URI[] urisToResolveName)
Description copied from interface: ConfigurationOperations
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.

Specified by:
setPlugInEventTypeResolutionURIs in interface ConfigurationOperations
Parameters:
urisToResolveName - URIs for resolving the name

addRevisionEventType

public void addRevisionEventType(java.lang.String revisioneventTypeName,
                                 ConfigurationRevisionEventType revisionEventTypeConfig)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addRevisionEventType in interface ConfigurationOperations
Parameters:
revisioneventTypeName - the name of the revision event type
revisionEventTypeConfig - the configuration

addVariantStream

public void addVariantStream(java.lang.String varianteventTypeName,
                             ConfigurationVariantStream variantStreamConfig)
Description copied from interface: ConfigurationOperations
Adds a new variant stream. Variant streams allow events of disparate types to be treated the same.

Specified by:
addVariantStream in interface ConfigurationOperations
Parameters:
varianteventTypeName - is the name of the variant stream
variantStreamConfig - the configuration such as variant type names and any-type setting

updateMapEventType

public void updateMapEventType(java.lang.String mapeventTypeName,
                               java.util.Map<java.lang.String,java.lang.Object> typeMap)
                        throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
updateMapEventType in interface ConfigurationOperations
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

updateObjectArrayEventType

public void updateObjectArrayEventType(java.lang.String objectArrayEventTypeName,
                                       java.lang.String[] propertyNames,
                                       java.lang.Object[] propertyTypes)
                                throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
updateObjectArrayEventType in interface ConfigurationOperations
Parameters:
objectArrayEventTypeName - the name of the object-array event type to update
propertyNames - property names
propertyTypes - property types
Throws:
ConfigurationException - if the event type name could not be found or is not a Map

replaceXMLEventType

public void replaceXMLEventType(java.lang.String xmlEventTypeName,
                                ConfigurationEventTypeXMLDOM config)
                         throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
replaceXMLEventType in interface ConfigurationOperations
Parameters:
xmlEventTypeName - the name of the XML event type
config - the new type configuration
Throws:
ConfigurationException - thrown when the type information change failed

setMetricsReportingInterval

public void setMetricsReportingInterval(java.lang.String stmtGroupName,
                                        long newInterval)
Description copied from interface: ConfigurationOperations
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.

Specified by:
setMetricsReportingInterval in interface ConfigurationOperations
Parameters:
stmtGroupName - name of statement group, provide a null value for the default statement interval (default group)
newInterval - millisecond interval, use zero or negative value to disable

setMetricsReportingStmtEnabled

public void setMetricsReportingStmtEnabled(java.lang.String statementName)
Description copied from interface: ConfigurationOperations
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.

Specified by:
setMetricsReportingStmtEnabled in interface ConfigurationOperations
Parameters:
statementName - for which to enable metrics reporting

setMetricsReportingStmtDisabled

public void setMetricsReportingStmtDisabled(java.lang.String statementName)
Description copied from interface: ConfigurationOperations
Disable metrics reporting for a given statement.

Specified by:
setMetricsReportingStmtDisabled in interface ConfigurationOperations
Parameters:
statementName - for which to disable metrics reporting

setMetricsReportingEnabled

public void setMetricsReportingEnabled()
Description copied from interface: ConfigurationOperations
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.

Specified by:
setMetricsReportingEnabled in interface ConfigurationOperations

setMetricsReportingDisabled

public void setMetricsReportingDisabled()
Description copied from interface: ConfigurationOperations
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.

Specified by:
setMetricsReportingDisabled in interface ConfigurationOperations

isVariantStreamExists

public boolean isVariantStreamExists(java.lang.String name)
Description copied from interface: ConfigurationOperations
Returns true if a variant stream by the name has been declared, or false if not.

Specified by:
isVariantStreamExists in interface ConfigurationOperations
Parameters:
name - of variant stream
Returns:
indicator whether the variant stream by that name exists

removeEventType

public boolean removeEventType(java.lang.String name,
                               boolean force)
                        throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
removeEventType in interface ConfigurationOperations
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

removeVariable

public boolean removeVariable(java.lang.String name,
                              boolean force)
                       throws ConfigurationException
Description copied from interface: ConfigurationOperations
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.

Specified by:
removeVariable in interface ConfigurationOperations
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

getEventTypeNameUsedBy

public java.util.Set<java.lang.String> getEventTypeNameUsedBy(java.lang.String name)
Description copied from interface: ConfigurationOperations
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.

Specified by:
getEventTypeNameUsedBy in interface ConfigurationOperations
Parameters:
name - name of the event type
Returns:
statement names referencing that type

getVariableNameUsedBy

public java.util.Set<java.lang.String> getVariableNameUsedBy(java.lang.String variableName)
Description copied from interface: ConfigurationOperations
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.

Specified by:
getVariableNameUsedBy in interface ConfigurationOperations
Parameters:
variableName - name of the variable
Returns:
statement names referencing that variable

getEventType

public EventType getEventType(java.lang.String eventTypeName)
Description copied from interface: ConfigurationOperations
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.

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

getEventTypes

public EventType[] getEventTypes()
Description copied from interface: ConfigurationOperations
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.

Specified by:
getEventTypes in interface ConfigurationOperations
Returns:
event type array

addEventType

public void addEventType(java.lang.String eventTypeName,
                         java.lang.String eventClass,
                         ConfigurationEventTypeLegacy legacyEventTypeDesc)
Description copied from interface: ConfigurationOperations
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.

Specified by:
addEventType in interface ConfigurationOperations
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

setPatternMaxSubexpressions

public void setPatternMaxSubexpressions(java.lang.Long maxSubexpressions)
Description copied from interface: ConfigurationOperations
Set the current maximum pattern sub-expression count.

Use null to indicate that there is not current maximum.

Specified by:
setPatternMaxSubexpressions in interface ConfigurationOperations
Parameters:
maxSubexpressions - to set

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