com.espertech.esper.client
Class Configuration

java.lang.Object
  extended by com.espertech.esper.client.Configuration
All Implemented Interfaces:
ConfigurationInformation, ConfigurationOperations, java.io.Serializable

public class Configuration
extends java.lang.Object
implements ConfigurationOperations, ConfigurationInformation, java.io.Serializable

An instance of Configuration allows the application to specify properties to be used when creating a EPServiceProvider. Usually an application will create a single Configuration, then get one or more instances of EPServiceProvider via EPServiceProviderManager. The Configuration is meant only as an initialization-time object. EPServiceProviders are immutable and do not retain any association back to the Configuration.
The format of an Esper XML configuration file is defined in esper-configuration-x.y.xsd.

See Also:
Serialized Form

Nested Class Summary
static class Configuration.EventRepresentation
          Enumeration of event representation.
static class Configuration.PropertyResolutionStyle
          Enumeration of different resolution styles for resolving property names.
 
Field Summary
static java.lang.String ANNOTATION_IMPORT
          Import name of the package that hosts the annotation classes.
protected  java.util.Map<java.lang.String,ConfigurationDBRef> databaseReferences
          The class and package name imports that will be used to resolve partial class names.
protected  ConfigurationEngineDefaults engineDefaults
          Saves engine default configs such as threading settings
protected  java.lang.String epServicesContextFactoryClassName
          Optional classname to use for constructing services context.
protected static java.lang.String ESPER_DEFAULT_CONFIG
          Default name of the configuration file.
protected  java.util.Map<java.lang.String,java.lang.String> eventClasses
          Map of event name and fully-qualified class name.
protected  java.util.Set<java.lang.String> eventTypeAutoNamePackages
          Saves the packages to search to resolve event type names.
protected  java.util.Map<java.lang.String,ConfigurationEventTypeLegacy> eventTypesLegacy
          Map of event type name and Legacy-type event configuration.
protected  java.util.Map<java.lang.String,ConfigurationEventTypeXMLDOM> eventTypesXMLDOM
          Map of event type name and XML DOM configuration.
protected  java.util.List<java.lang.String> imports
          The class and package name imports that will be used to resolve partial class names.
protected  java.util.Map<java.lang.String,java.util.Properties> mapNames
          The type names for events that are backed by java.util.Map, not containing strongly-typed nested maps.
protected  java.util.Map<java.lang.String,ConfigurationEventTypeMap> mapTypeConfigurations
          Map event types additional configuration information.
protected  java.util.Map<java.lang.String,ConfigurationMethodRef> methodInvocationReferences
          Map of class name and configuration for method invocations on that class.
protected  java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> nestableMapNames
          The type names for events that are backed by java.util.Map, possibly containing strongly-typed nested maps.
protected  java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> nestableObjectArrayNames
          The type names for events that are backed by java.util.Map, possibly containing strongly-typed nested maps.
protected  java.util.Map<java.lang.String,ConfigurationEventTypeObjectArray> objectArrayTypeConfigurations
          Map event types additional configuration information.
protected  java.util.List<ConfigurationPlugInAggregationFunction> plugInAggregationFunctions
          List of configured plug-in aggregation functions.
protected  java.util.List<ConfigurationPlugInAggregationMultiFunction> plugInAggregationMultiFunctions
          List of configured plug-in aggregation multi-functions.
protected  java.util.Map<java.net.URI,ConfigurationPlugInEventRepresentation> plugInEventRepresentation
          Map of plug-in event representation name and configuration
protected  java.net.URI[] plugInEventTypeResolutionURIs
          URIs that point to plug-in event representations that are given a chance to dynamically resolve an event type name to an event type, as it occurs in a new EPL statement.
protected  java.util.Map<java.lang.String,ConfigurationPlugInEventType> plugInEventTypes
          Map of plug-in event types.
protected  java.util.List<ConfigurationPluginLoader> pluginLoaders
          List of adapter loaders.
protected  java.util.List<ConfigurationPlugInPatternObject> plugInPatternObjects
          List of configured plug-in pattern objects.
protected  java.util.List<ConfigurationPlugInSingleRowFunction> plugInSingleRowFunctions
          List of configured plug-in single-row functions.
protected  java.util.List<ConfigurationPlugInView> plugInViews
          List of configured plug-in views.
protected  java.util.List<ConfigurationPlugInVirtualDataWindow> plugInVirtualDataWindows
          List of configured plug-in views.
protected  java.util.Map<java.lang.String,ConfigurationRevisionEventType> revisionEventTypes
          All revision event types which allow updates to past events.
protected  java.util.Map<java.lang.String,ConfigurationVariable> variables
          Map of variables.
protected  java.util.Map<java.lang.String,ConfigurationVariantStream> variantStreams
          Variant streams allow events of disparate types to be treated the same.
 
Constructor Summary
Configuration()
          Constructs an empty configuration.
 
Method Summary
 void addDatabaseReference(java.lang.String name, ConfigurationDBRef configurationDBRef)
          Add a database reference with a given database name.
 void addEventType(java.lang.Class eventClass)
          Add an name for an event type represented by Java-bean plain-old Java object events, and the name is the simple class name of the class.
 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 name for 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 Java-bean plain-old Java 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 config)
          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 autoImport)
          Adds a class to the list of automatically-imported classes.
 void addImport(java.lang.String autoImport)
          Adds a package or class to the list of automatically-imported classes and packages.
 void addMapConfiguration(java.lang.String mapeventTypeName, ConfigurationEventTypeMap config)
          Add configuration for a map event type.
 void addMapSuperType(java.lang.String mapeventTypeName, java.lang.String mapSupertypeName)
          Add, for a given Map event type identified by the first parameter, the supertype (by its event type name).
 void addMethodRef(java.lang.Class clazz, ConfigurationMethodRef methodInvocationConfig)
          Adds a cache configuration for a class providing methods for use in the from-clause.
 void addMethodRef(java.lang.String className, ConfigurationMethodRef methodInvocationConfig)
          Adds a cache configuration for a class providing methods for use in the from-clause.
 void addObjectArrayConfiguration(java.lang.String objectArrayeventTypeName, ConfigurationEventTypeObjectArray config)
          Add configuration for a object array event type.
 void addObjectArraySuperType(java.lang.String eventTypeName, java.lang.String supertypeName)
          Add, for a given Object-array event type identified by the first parameter, the supertype (by its event type name).
 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 addPlugInEventRepresentation(java.net.URI eventRepresentationRootURI, java.lang.Class eventRepresentationClass, java.io.Serializable initializer)
          Adds an event representation responsible for creating event types (event metadata) and event bean instances (events) for a certain kind of object representation that holds the event property values.
 void addPlugInEventRepresentation(java.net.URI eventRepresentationRootURI, java.lang.String eventRepresentationClassName, java.io.Serializable initializer)
          Adds an event representation responsible for creating event types (event metadata) and event bean instances (events) for a certain kind of object representation that holds the event property values.
 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 addPluginLoader(java.lang.String loaderName, java.lang.String className)
          Add a plugin loader (f.e.
 void addPluginLoader(java.lang.String loaderName, java.lang.String className, java.util.Properties configuration)
          Add a plugin loader (f.e.
 void addPluginLoader(java.lang.String loaderName, java.lang.String className, java.util.Properties configuration, java.lang.String configurationXML)
          Add a plugin loader (f.e.
 void addPlugInPatternGuard(java.lang.String namespace, java.lang.String name, java.lang.String guardFactoryClass)
          Add a pattern guard for plug-in.
 void addPlugInPatternObserver(java.lang.String namespace, java.lang.String name, java.lang.String observerFactoryClass)
          Add a pattern event observer for plug-in.
 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)
          Add single-row function with configurations.
 void addPlugInSingleRowFunction(java.lang.String functionName, java.lang.String className, java.lang.String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable, boolean rethrowExceptions)
          Add single-row function with configurations.
 void addPlugInView(java.lang.String namespace, java.lang.String name, java.lang.String viewFactoryClass)
          Add a view for plug-in.
 void addPlugInVirtualDataWindow(java.lang.String namespace, java.lang.String name, java.lang.String factoryClass)
          Add a virtual data window for plug-in.
 void addPlugInVirtualDataWindow(java.lang.String namespace, java.lang.String name, java.lang.String factoryClass, java.io.Serializable customConfigurationObject)
          Add a virtual data window for plug-in.
 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.Class type, java.lang.Object initializationValue, boolean constant)
          Add variable that can be a constant.
 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 varianteventTypeName, ConfigurationVariantStream variantStreamConfig)
          Adds a new variant stream.
 Configuration configure()
          Use the configuration specified in an application resource named esper.cfg.xml.
 Configuration configure(org.w3c.dom.Document document)
          Use the mappings and properties specified in the given XML document.
 Configuration configure(java.io.File configFile)
          Use the configuration specified in the given application file.
 Configuration configure(java.lang.String resource)
          Use the configuration specified in the given application resource.
 Configuration configure(java.net.URL url)
          Use the configuration specified by the given URL.
protected static java.io.InputStream getConfigurationInputStream(java.lang.String resource)
          Get the configuration file as an InputStream.
 java.util.Map<java.lang.String,ConfigurationDBRef> getDatabaseReferences()
          Returns a map of string database names to database configuration options.
 ConfigurationEngineDefaults getEngineDefaults()
          Returns engine default settings.
 java.lang.String getEPServicesContextFactoryClassName()
          Returns the service context factory class name
 EventType getEventType(java.lang.String eventTypeName)
          Returns the event type for a given event type name.
 java.util.Set<java.lang.String> getEventTypeAutoNamePackages()
          Returns a set of Java package names that Java event classes reside in.
 java.util.Map<java.lang.String,java.lang.String> getEventTypeNames()
          Returns the mapping of event type name to Java class 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.Map<java.lang.String,ConfigurationEventTypeLegacy> getEventTypesLegacy()
          Returns the mapping of event type name to legacy java event type information.
 java.util.Map<java.lang.String,java.util.Properties> getEventTypesMapEvents()
          Returns a map keyed by event type name, and values being the definition for the Map event type of the property names and types that make up the event.
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getEventTypesNestableMapEvents()
          Returns a map keyed by event type name, and values being the definition for the event type of the property names and types that make up the event, for nestable, strongly-typed Map-based event representations.
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getEventTypesNestableObjectArrayEvents()
          Returns the object-array event types.
 java.util.Map<java.lang.String,ConfigurationEventTypeXMLDOM> getEventTypesXMLDOM()
          Returns the mapping of event type name to XML DOM event type information.
 java.util.List<java.lang.String> getImports()
          Returns the class and package imports.
 java.util.Map<java.lang.String,ConfigurationEventTypeMap> getMapTypeConfigurations()
          Returns for each Map event type name the set of supertype event type names (Map types only).
 java.util.Map<java.lang.String,ConfigurationMethodRef> getMethodInvocationReferences()
          Returns a map of class name and cache configurations, for use in method invocations in the from-clause of methods provided by the class.
 java.util.Map<java.lang.String,ConfigurationEventTypeObjectArray> getObjectArrayTypeConfigurations()
          Returns the object-array event type configurations.
 java.util.List<ConfigurationPlugInAggregationFunction> getPlugInAggregationFunctions()
          Returns a list of configured plug-in aggregation functions.
 java.util.List<ConfigurationPlugInAggregationMultiFunction> getPlugInAggregationMultiFunctions()
          Returns a list of configured plug-in multi-function aggregation functions.
 java.util.Map<java.net.URI,ConfigurationPlugInEventRepresentation> getPlugInEventRepresentation()
          Returns a map of plug-in event representation URI and their event representation class and initializer.
 java.net.URI[] getPlugInEventTypeResolutionURIs()
          Returns 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.
 java.util.Map<java.lang.String,ConfigurationPlugInEventType> getPlugInEventTypes()
          Returns a map of event type name of those event types that will be supplied by a plug-in event representation, and their configuration.
 java.util.List<ConfigurationPluginLoader> getPluginLoaders()
          Returns a list of configured plugin loaders.
 java.util.List<ConfigurationPlugInPatternObject> getPlugInPatternObjects()
          Returns a list of configured plug-ins for pattern observers and guards.
 java.util.List<ConfigurationPlugInSingleRowFunction> getPlugInSingleRowFunctions()
          Returns a list of configured plug-in single-row functions.
 java.util.List<ConfigurationPlugInView> getPlugInViews()
          Returns a list of configured plug-in views.
 java.util.List<ConfigurationPlugInVirtualDataWindow> getPlugInVirtualDataWindows()
          Returns a list of configured plug-in virtual data windows.
protected static java.io.InputStream getResourceAsStream(java.lang.String resource)
          Returns an input stream from an application resource in the classpath.
 java.util.Map<java.lang.String,ConfigurationRevisionEventType> getRevisionEventTypes()
          Returns a map of revision event type name and revision event type configuration.
 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.
 java.util.Map<java.lang.String,ConfigurationVariable> getVariables()
          Returns the global variables by name as key and type plus initialization value as value
 java.util.Map<java.lang.String,ConfigurationVariantStream> getVariantStreams()
          Returns a map of variant stream name and variant configuration information.
 boolean isEventTypeExists(java.lang.String eventTypeName)
          Checks if an event type 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 eventTypeName, boolean force)
          Remove an event type by its name, returning an indicator whether the event type was found and removed.
 void removeImport(java.lang.String name)
          Remove an import.
 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.
protected  void reset()
          Reset to an empty configuration.
 void setEPServicesContextFactoryClassName(java.lang.String epServicesContextFactoryClassName)
          Sets the class name of the services context factory class to use.
 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 myEvent, java.lang.String[] namesNew, java.lang.Object[] typesNew)
          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
 

Field Detail

ANNOTATION_IMPORT

public static final java.lang.String ANNOTATION_IMPORT
Import name of the package that hosts the annotation classes.


ESPER_DEFAULT_CONFIG

protected static final java.lang.String ESPER_DEFAULT_CONFIG
Default name of the configuration file.

See Also:
Constant Field Values

eventClasses

protected java.util.Map<java.lang.String,java.lang.String> eventClasses
Map of event name and fully-qualified class name.


eventTypesXMLDOM

protected java.util.Map<java.lang.String,ConfigurationEventTypeXMLDOM> eventTypesXMLDOM
Map of event type name and XML DOM configuration.


eventTypesLegacy

protected java.util.Map<java.lang.String,ConfigurationEventTypeLegacy> eventTypesLegacy
Map of event type name and Legacy-type event configuration.


mapNames

protected java.util.Map<java.lang.String,java.util.Properties> mapNames
The type names for events that are backed by java.util.Map, not containing strongly-typed nested maps.


nestableMapNames

protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> nestableMapNames
The type names for events that are backed by java.util.Map, possibly containing strongly-typed nested maps.

Each entrie's value must be either a Class or a Map to define nested maps.


nestableObjectArrayNames

protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> nestableObjectArrayNames
The type names for events that are backed by java.util.Map, possibly containing strongly-typed nested maps.

Each entrie's value must be either a Class or a Map to define nested maps.


mapTypeConfigurations

protected java.util.Map<java.lang.String,ConfigurationEventTypeMap> mapTypeConfigurations
Map event types additional configuration information.


objectArrayTypeConfigurations

protected java.util.Map<java.lang.String,ConfigurationEventTypeObjectArray> objectArrayTypeConfigurations
Map event types additional configuration information.


imports

protected java.util.List<java.lang.String> imports
The class and package name imports that will be used to resolve partial class names.


databaseReferences

protected java.util.Map<java.lang.String,ConfigurationDBRef> databaseReferences
The class and package name imports that will be used to resolve partial class names.


epServicesContextFactoryClassName

protected java.lang.String epServicesContextFactoryClassName
Optional classname to use for constructing services context.


plugInViews

protected java.util.List<ConfigurationPlugInView> plugInViews
List of configured plug-in views.


plugInVirtualDataWindows

protected java.util.List<ConfigurationPlugInVirtualDataWindow> plugInVirtualDataWindows
List of configured plug-in views.


plugInPatternObjects

protected java.util.List<ConfigurationPlugInPatternObject> plugInPatternObjects
List of configured plug-in pattern objects.


plugInAggregationFunctions

protected java.util.List<ConfigurationPlugInAggregationFunction> plugInAggregationFunctions
List of configured plug-in aggregation functions.


plugInAggregationMultiFunctions

protected java.util.List<ConfigurationPlugInAggregationMultiFunction> plugInAggregationMultiFunctions
List of configured plug-in aggregation multi-functions.


plugInSingleRowFunctions

protected java.util.List<ConfigurationPlugInSingleRowFunction> plugInSingleRowFunctions
List of configured plug-in single-row functions.


pluginLoaders

protected java.util.List<ConfigurationPluginLoader> pluginLoaders
List of adapter loaders.


engineDefaults

protected ConfigurationEngineDefaults engineDefaults
Saves engine default configs such as threading settings


eventTypeAutoNamePackages

protected java.util.Set<java.lang.String> eventTypeAutoNamePackages
Saves the packages to search to resolve event type names.


variables

protected java.util.Map<java.lang.String,ConfigurationVariable> variables
Map of variables.


methodInvocationReferences

protected java.util.Map<java.lang.String,ConfigurationMethodRef> methodInvocationReferences
Map of class name and configuration for method invocations on that class.


plugInEventRepresentation

protected java.util.Map<java.net.URI,ConfigurationPlugInEventRepresentation> plugInEventRepresentation
Map of plug-in event representation name and configuration


plugInEventTypes

protected java.util.Map<java.lang.String,ConfigurationPlugInEventType> plugInEventTypes
Map of plug-in event types.


plugInEventTypeResolutionURIs

protected java.net.URI[] plugInEventTypeResolutionURIs
URIs that point to plug-in event representations that are given a chance to dynamically resolve an event type name to an event type, as it occurs in a new EPL statement.


revisionEventTypes

protected java.util.Map<java.lang.String,ConfigurationRevisionEventType> revisionEventTypes
All revision event types which allow updates to past events.


variantStreams

protected java.util.Map<java.lang.String,ConfigurationVariantStream> variantStreams
Variant streams allow events of disparate types to be treated the same.

Constructor Detail

Configuration

public Configuration()
Constructs an empty configuration. The auto import values are set by default to java.lang, java.math, java.text and java.util.

Method Detail

setEPServicesContextFactoryClassName

public void setEPServicesContextFactoryClassName(java.lang.String epServicesContextFactoryClassName)
Sets the class name of the services context factory class to use.

Parameters:
epServicesContextFactoryClassName - service context factory class name

getEPServicesContextFactoryClassName

public java.lang.String getEPServicesContextFactoryClassName()
Description copied from interface: ConfigurationInformation
Returns the service context factory class name

Specified by:
getEPServicesContextFactoryClassName in interface ConfigurationInformation
Returns:
class name

addPlugInAggregationFunctionFactory

public void addPlugInAggregationFunctionFactory(java.lang.String functionName,
                                                java.lang.String aggregationFactoryClassName)
                                         throws ConfigurationException
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
Throws:
ConfigurationException - is thrown to indicate a problem adding the aggregation function

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

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)
                                throws ConfigurationException
Add single-row function with configurations.

Parameters:
functionName - EPL name of function
className - providing fully-qualified class name
methodName - providing method name
valueCache - value cache settings
filterOptimizable - settings whether subject to optimizations
Throws:
ConfigurationException - thrown to indicate that the configuration is invalid

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
Add single-row function with configurations.

Specified by:
addPlugInSingleRowFunction in interface ConfigurationOperations
Parameters:
functionName - EPL name of function
className - providing fully-qualified class name
methodName - providing method name
valueCache - value cache settings
filterOptimizable - settings whether subject to optimizations
rethrowExceptions - whether exceptions generated by the UDF are rethrown
Throws:
ConfigurationException - thrown to indicate that the configuration is invalid

isEventTypeExists

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

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

addEventType

public void addEventType(java.lang.String eventTypeName,
                         java.lang.String eventClassName)
Add an name for an event type represented by Java-bean plain-old Java object events. 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
eventClassName - fully-qualified class name of the event type

addEventType

public 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. 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 - is the Java event class for which to add the name

addEventType

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

Specified by:
addEventType in interface ConfigurationOperations
Parameters:
eventClass - is the Java event class for which to add the name

addEventType

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

Each entry in the type map is the property name and the fully-qualified Java class name or primitive type name.

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)
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

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

addMapSuperType

public void addMapSuperType(java.lang.String mapeventTypeName,
                            java.lang.String mapSupertypeName)
Add, for a given Map event type identified by the first parameter, the supertype (by its event type name).

Each Map event type may have any number of supertypes, each supertype must also be of a Map-type event.

Parameters:
mapeventTypeName - the name of a Map event type, that is to have a supertype
mapSupertypeName - the name of a Map event type that is the supertype

addObjectArraySuperType

public void addObjectArraySuperType(java.lang.String eventTypeName,
                                    java.lang.String supertypeName)
Add, for a given Object-array event type identified by the first parameter, the supertype (by its event type name).

Each Object array event type may have any number of supertypes, each supertype must also be of a Object-array-type event.

Parameters:
eventTypeName - the name of a Map event type, that is to have a supertype
supertypeName - the name of a Map event type that is the supertype

addMapConfiguration

public void addMapConfiguration(java.lang.String mapeventTypeName,
                                ConfigurationEventTypeMap config)
Add configuration for a map event type.

Parameters:
mapeventTypeName - configuration to add
config - map type configuration

addObjectArrayConfiguration

public void addObjectArrayConfiguration(java.lang.String objectArrayeventTypeName,
                                        ConfigurationEventTypeObjectArray config)
Add configuration for a object array event type.

Parameters:
objectArrayeventTypeName - configuration to add
config - map type configuration

addEventType

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

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

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 config)
                  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
config - object-array type configuration
Throws:
ConfigurationException - if the name is already in used for a different type

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

addDatabaseReference

public void addDatabaseReference(java.lang.String name,
                                 ConfigurationDBRef configurationDBRef)
Add a database reference with a given database name.

Parameters:
name - is the database name
configurationDBRef - descriptor containing database connection and access policy information

addEventType

public 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. 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

addImport

public void addImport(java.lang.String autoImport)
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:
autoImport - is a fully-qualified class name or a package name with wildcard

addImport

public void addImport(java.lang.Class autoImport)
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:
autoImport - is a class to import

removeImport

public void removeImport(java.lang.String name)
Remove an import.

Parameters:
name - to remove

addMethodRef

public void addMethodRef(java.lang.String className,
                         ConfigurationMethodRef methodInvocationConfig)
Adds a cache configuration for a class providing methods for use in the from-clause.

Parameters:
className - is the class name (simple or fully-qualified) providing methods
methodInvocationConfig - is the cache configuration

addMethodRef

public void addMethodRef(java.lang.Class clazz,
                         ConfigurationMethodRef methodInvocationConfig)
Adds a cache configuration for a class providing methods for use in the from-clause.

Parameters:
clazz - is the class providing methods
methodInvocationConfig - is the cache configuration

getEventTypeNames

public java.util.Map<java.lang.String,java.lang.String> getEventTypeNames()
Description copied from interface: ConfigurationInformation
Returns the mapping of event type name to Java class name.

Specified by:
getEventTypeNames in interface ConfigurationInformation
Returns:
event type names for Java class names

getEventTypesMapEvents

public java.util.Map<java.lang.String,java.util.Properties> getEventTypesMapEvents()
Description copied from interface: ConfigurationInformation
Returns a map keyed by event type name, and values being the definition for the Map event type of the property names and types that make up the event.

Specified by:
getEventTypesMapEvents in interface ConfigurationInformation
Returns:
map of event type name and definition of event properties

getEventTypesNestableMapEvents

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getEventTypesNestableMapEvents()
Description copied from interface: ConfigurationInformation
Returns a map keyed by event type name, and values being the definition for the event type of the property names and types that make up the event, for nestable, strongly-typed Map-based event representations.

Specified by:
getEventTypesNestableMapEvents in interface ConfigurationInformation
Returns:
map of event type name and definition of event properties

getEventTypesNestableObjectArrayEvents

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getEventTypesNestableObjectArrayEvents()
Description copied from interface: ConfigurationInformation
Returns the object-array event types.

Specified by:
getEventTypesNestableObjectArrayEvents in interface ConfigurationInformation
Returns:
object-array event types

getEventTypesXMLDOM

public java.util.Map<java.lang.String,ConfigurationEventTypeXMLDOM> getEventTypesXMLDOM()
Description copied from interface: ConfigurationInformation
Returns the mapping of event type name to XML DOM event type information.

Specified by:
getEventTypesXMLDOM in interface ConfigurationInformation
Returns:
event type name mapping to XML DOM configs

getEventTypesLegacy

public java.util.Map<java.lang.String,ConfigurationEventTypeLegacy> getEventTypesLegacy()
Description copied from interface: ConfigurationInformation
Returns the mapping of event type name to legacy java event type information.

Specified by:
getEventTypesLegacy in interface ConfigurationInformation
Returns:
event type name mapping to legacy java class configs

getImports

public java.util.List<java.lang.String> getImports()
Description copied from interface: ConfigurationInformation
Returns the class and package imports.

Specified by:
getImports in interface ConfigurationInformation
Returns:
imported names

getDatabaseReferences

public java.util.Map<java.lang.String,ConfigurationDBRef> getDatabaseReferences()
Description copied from interface: ConfigurationInformation
Returns a map of string database names to database configuration options.

Specified by:
getDatabaseReferences in interface ConfigurationInformation
Returns:
map of database configurations

getPlugInViews

public java.util.List<ConfigurationPlugInView> getPlugInViews()
Description copied from interface: ConfigurationInformation
Returns a list of configured plug-in views.

Specified by:
getPlugInViews in interface ConfigurationInformation
Returns:
list of plug-in view configs

getObjectArrayTypeConfigurations

public java.util.Map<java.lang.String,ConfigurationEventTypeObjectArray> getObjectArrayTypeConfigurations()
Description copied from interface: ConfigurationInformation
Returns the object-array event type configurations.

Specified by:
getObjectArrayTypeConfigurations in interface ConfigurationInformation
Returns:
type configs

getPlugInVirtualDataWindows

public java.util.List<ConfigurationPlugInVirtualDataWindow> getPlugInVirtualDataWindows()
Description copied from interface: ConfigurationInformation
Returns a list of configured plug-in virtual data windows.

Specified by:
getPlugInVirtualDataWindows in interface ConfigurationInformation
Returns:
list of plug-in virtual data windows

getPluginLoaders

public java.util.List<ConfigurationPluginLoader> getPluginLoaders()
Description copied from interface: ConfigurationInformation
Returns a list of configured plugin loaders.

Specified by:
getPluginLoaders in interface ConfigurationInformation
Returns:
adapter loaders

getPlugInAggregationFunctions

public java.util.List<ConfigurationPlugInAggregationFunction> getPlugInAggregationFunctions()
Description copied from interface: ConfigurationInformation
Returns a list of configured plug-in aggregation functions.

Specified by:
getPlugInAggregationFunctions in interface ConfigurationInformation
Returns:
list of configured aggregations

getPlugInAggregationMultiFunctions

public java.util.List<ConfigurationPlugInAggregationMultiFunction> getPlugInAggregationMultiFunctions()
Description copied from interface: ConfigurationInformation
Returns a list of configured plug-in multi-function aggregation functions.

Specified by:
getPlugInAggregationMultiFunctions in interface ConfigurationInformation
Returns:
list of configured multi-function aggregations

getPlugInSingleRowFunctions

public java.util.List<ConfigurationPlugInSingleRowFunction> getPlugInSingleRowFunctions()
Description copied from interface: ConfigurationInformation
Returns a list of configured plug-in single-row functions.

Specified by:
getPlugInSingleRowFunctions in interface ConfigurationInformation
Returns:
list of configured single-row functions

getPlugInPatternObjects

public java.util.List<ConfigurationPlugInPatternObject> getPlugInPatternObjects()
Description copied from interface: ConfigurationInformation
Returns a list of configured plug-ins for pattern observers and guards.

Specified by:
getPlugInPatternObjects in interface ConfigurationInformation
Returns:
list of pattern plug-ins

getVariables

public java.util.Map<java.lang.String,ConfigurationVariable> getVariables()
Description copied from interface: ConfigurationInformation
Returns the global variables by name as key and type plus initialization value as value

Specified by:
getVariables in interface ConfigurationInformation
Returns:
map of variable name and variable configuration

getMethodInvocationReferences

public java.util.Map<java.lang.String,ConfigurationMethodRef> getMethodInvocationReferences()
Description copied from interface: ConfigurationInformation
Returns a map of class name and cache configurations, for use in method invocations in the from-clause of methods provided by the class.

Specified by:
getMethodInvocationReferences in interface ConfigurationInformation
Returns:
map of fully-qualified or simple class name and cache configuration

getRevisionEventTypes

public java.util.Map<java.lang.String,ConfigurationRevisionEventType> getRevisionEventTypes()
Description copied from interface: ConfigurationInformation
Returns a map of revision event type name and revision event type configuration. Revision event types handle updates (new versions) for past events.

Specified by:
getRevisionEventTypes in interface ConfigurationInformation
Returns:
map of name and revision event type config

getMapTypeConfigurations

public java.util.Map<java.lang.String,ConfigurationEventTypeMap> getMapTypeConfigurations()
Description copied from interface: ConfigurationInformation
Returns for each Map event type name the set of supertype event type names (Map types only).

Specified by:
getMapTypeConfigurations in interface ConfigurationInformation
Returns:
map of name to set of supertype names

addPluginLoader

public void addPluginLoader(java.lang.String loaderName,
                            java.lang.String className,
                            java.util.Properties configuration)
Add a plugin loader (f.e. an input/output adapter loader).

The class is expected to implement PluginLoader

.

Parameters:
loaderName - is the name of the loader
className - is the fully-qualified classname of the loader class
configuration - is loader cofiguration entries

addPluginLoader

public void addPluginLoader(java.lang.String loaderName,
                            java.lang.String className)
Add a plugin loader (f.e. an input/output adapter loader) without any additional loader configuration

The class is expected to implement PluginLoader

.

Parameters:
loaderName - is the name of the loader
className - is the fully-qualified classname of the loader class

addPluginLoader

public void addPluginLoader(java.lang.String loaderName,
                            java.lang.String className,
                            java.util.Properties configuration,
                            java.lang.String configurationXML)
Add a plugin loader (f.e. an input/output adapter loader).

The class is expected to implement PluginLoader

.

Parameters:
loaderName - is the name of the loader
className - is the fully-qualified classname of the loader class
configuration - is loader cofiguration entries
configurationXML - config xml if any

addPlugInView

public void addPlugInView(java.lang.String namespace,
                          java.lang.String name,
                          java.lang.String viewFactoryClass)
Add a view for plug-in.

Specified by:
addPlugInView in interface ConfigurationOperations
Parameters:
namespace - is the namespace the view should be available under
name - is the name of the view
viewFactoryClass - is the view factory class to use

addPlugInVirtualDataWindow

public void addPlugInVirtualDataWindow(java.lang.String namespace,
                                       java.lang.String name,
                                       java.lang.String factoryClass)
Add a virtual data window for plug-in.

Parameters:
namespace - is the namespace the virtual data window should be available under
name - is the name of the data window
factoryClass - is the view factory class to use

addPlugInVirtualDataWindow

public void addPlugInVirtualDataWindow(java.lang.String namespace,
                                       java.lang.String name,
                                       java.lang.String factoryClass,
                                       java.io.Serializable customConfigurationObject)
Add a virtual data window for plug-in.

Parameters:
namespace - is the namespace the virtual data window should be available under
name - is the name of the data window
factoryClass - is the view factory class to use
customConfigurationObject - additional configuration to be passed along

addPlugInPatternObserver

public void addPlugInPatternObserver(java.lang.String namespace,
                                     java.lang.String name,
                                     java.lang.String observerFactoryClass)
Add a pattern event observer for plug-in.

Parameters:
namespace - is the namespace the observer should be available under
name - is the name of the observer
observerFactoryClass - is the observer factory class to use

addPlugInPatternGuard

public void addPlugInPatternGuard(java.lang.String namespace,
                                  java.lang.String name,
                                  java.lang.String guardFactoryClass)
Add a pattern guard for plug-in.

Parameters:
namespace - is the namespace the guard should be available under
name - is the name of the guard
guardFactoryClass - is the guard factory class to use

addEventTypeAutoName

public void addEventTypeAutoName(java.lang.String packageName)
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:
packageName - is the fully-qualified Java package name of the Java package that event classes reside in

addVariable

public void addVariable(java.lang.String variableName,
                        java.lang.Class type,
                        java.lang.Object initializationValue)
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.

addVariable

public void addVariable(java.lang.String variableName,
                        java.lang.Class type,
                        java.lang.Object initializationValue,
                        boolean constant)
Add variable that can be a constant.

Parameters:
variableName - name of variable
type - variable type
initializationValue - initial value
constant - constant indicator

addVariable

public void addVariable(java.lang.String variableName,
                        java.lang.String 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 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

addPlugInEventRepresentation

public void addPlugInEventRepresentation(java.net.URI eventRepresentationRootURI,
                                         java.lang.String eventRepresentationClassName,
                                         java.io.Serializable initializer)
Adds an event representation responsible for creating event types (event metadata) and event bean instances (events) for a certain kind of object representation that holds the event property values.

Parameters:
eventRepresentationRootURI - uniquely identifies the event representation and acts as a parent for child URIs used in resolving
eventRepresentationClassName - is the name of the class implementing PlugInEventRepresentation.
initializer - is optional configuration or initialization information, or null if none required

addPlugInEventRepresentation

public void addPlugInEventRepresentation(java.net.URI eventRepresentationRootURI,
                                         java.lang.Class eventRepresentationClass,
                                         java.io.Serializable initializer)
Adds an event representation responsible for creating event types (event metadata) and event bean instances (events) for a certain kind of object representation that holds the event property values.

Parameters:
eventRepresentationRootURI - uniquely identifies the event representation and acts as a parent for child URIs used in resolving
eventRepresentationClass - is the class implementing PlugInEventRepresentation.
initializer - is optional configuration or initialization information, or null if none required

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

getPlugInEventTypeResolutionURIs

public java.net.URI[] getPlugInEventTypeResolutionURIs()
Description copied from interface: ConfigurationInformation
Returns 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:
getPlugInEventTypeResolutionURIs in interface ConfigurationInformation
Returns:
URIs for resolving an event type name

getPlugInEventRepresentation

public java.util.Map<java.net.URI,ConfigurationPlugInEventRepresentation> getPlugInEventRepresentation()
Description copied from interface: ConfigurationInformation
Returns a map of plug-in event representation URI and their event representation class and initializer.

Specified by:
getPlugInEventRepresentation in interface ConfigurationInformation
Returns:
map of URI keys and event representation configuration

getPlugInEventTypes

public java.util.Map<java.lang.String,ConfigurationPlugInEventType> getPlugInEventTypes()
Description copied from interface: ConfigurationInformation
Returns a map of event type name of those event types that will be supplied by a plug-in event representation, and their configuration.

Specified by:
getPlugInEventTypes in interface ConfigurationInformation
Returns:
map of names to plug-in event type config

getEventTypeAutoNamePackages

public java.util.Set<java.lang.String> getEventTypeAutoNamePackages()
Description copied from interface: ConfigurationInformation
Returns a set of Java package names 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:
getEventTypeAutoNamePackages in interface ConfigurationInformation
Returns:
set of Java package names to look for events types when encountering a new event type name

getEngineDefaults

public ConfigurationEngineDefaults getEngineDefaults()
Description copied from interface: ConfigurationInformation
Returns engine default settings.

Specified by:
getEngineDefaults in interface ConfigurationInformation
Returns:
engine defaults

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

getVariantStreams

public java.util.Map<java.lang.String,ConfigurationVariantStream> getVariantStreams()
Description copied from interface: ConfigurationInformation
Returns a map of variant stream name and variant configuration information. Variant streams allows handling events of all sorts of different event types the same way.

Specified by:
getVariantStreams in interface ConfigurationInformation
Returns:
map of name and variant stream config

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 myEvent,
                                       java.lang.String[] namesNew,
                                       java.lang.Object[] typesNew)
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:
myEvent - the name of the object-array event type to update
namesNew - property names
typesNew - property types

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

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

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

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

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

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

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

configure

public Configuration configure()
                        throws EPException
Use the configuration specified in an application resource named esper.cfg.xml.

Returns:
Configuration initialized from the resource
Throws:
EPException - thrown to indicate error reading configuration

configure

public Configuration configure(java.lang.String resource)
                        throws EPException
Use the configuration specified in the given application resource. The format of the resource is defined in esper-configuration-2.0.xsd.

The resource is found via getConfigurationInputStream(resource). That method can be overridden to implement an arbitrary lookup strategy.

See getResourceAsStream for information on how the resource name is resolved.

Parameters:
resource - if the file name of the resource
Returns:
Configuration initialized from the resource
Throws:
EPException - thrown to indicate error reading configuration

getConfigurationInputStream

protected static java.io.InputStream getConfigurationInputStream(java.lang.String resource)
                                                          throws EPException
Get the configuration file as an InputStream. Might be overridden by subclasses to allow the configuration to be located by some arbitrary mechanism.

See getResourceAsStream for information on how the resource name is resolved.

Parameters:
resource - is the resource name
Returns:
input stream for resource
Throws:
EPException - thrown to indicate error reading configuration

configure

public Configuration configure(java.net.URL url)
                        throws EPException
Use the configuration specified by the given URL. The format of the document obtained from the URL is defined in esper-configuration-2.0.xsd.

Parameters:
url - URL from which you wish to load the configuration
Returns:
A configuration configured via the file
Throws:
EPException - is thrown when the URL could not be access

configure

public Configuration configure(java.io.File configFile)
                        throws EPException
Use the configuration specified in the given application file. The format of the file is defined in esper-configuration-2.0.xsd.

Parameters:
configFile - File from which you wish to load the configuration
Returns:
A configuration configured via the file
Throws:
EPException - when the file could not be found

removeEventType

public boolean removeEventType(java.lang.String eventTypeName,
                               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:
eventTypeName - 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

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

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

configure

public Configuration configure(org.w3c.dom.Document document)
                        throws EPException
Use the mappings and properties specified in the given XML document. The format of the file is defined in esper-configuration-2.0.xsd.

Parameters:
document - an XML document from which you wish to load the configuration
Returns:
A configuration configured via the Document
Throws:
EPException - if there is problem in accessing the document.

getResourceAsStream

protected static java.io.InputStream getResourceAsStream(java.lang.String resource)
Returns an input stream from an application resource in the classpath.

The method first removes the '/' character from the resource name if the first character is '/'.

The lookup order is as follows:

If a thread context class loader exists, use Thread.currentThread().getResourceAsStream to obtain an InputStream.

If no input stream was returned, use the Configuration.class.getResourceAsStream. to obtain an InputStream.

If no input stream was returned, use the Configuration.class.getClassLoader().getResourceAsStream. to obtain an InputStream.

If no input stream was returned, throw an Exception.

Parameters:
resource - to get input stream for
Returns:
input stream for resource

reset

protected void reset()
Reset to an empty configuration.


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