public class Configuration extends Object implements ConfigurationOperations, ConfigurationInformation, Serializable
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.
Modifier and Type | Class and Description |
---|---|
static class |
Configuration.PropertyResolutionStyle
Enumeration of different resolution styles for resolving property names.
|
Modifier and Type | Field and Description |
---|---|
static String |
ANNOTATION_IMPORT
Import name of the package that hosts the annotation classes.
|
protected List<String> |
annotationImports
For annotations only, the class and package name imports that
will be used to resolve partial class names (not available in EPL statements unless used in an annotation).
|
protected Map<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 String |
epServicesContextFactoryClassName
Optional classname to use for constructing services context.
|
protected static String |
ESPER_DEFAULT_CONFIG
Default name of the configuration file.
|
protected Map<String,String> |
eventClasses
Map of event name and fully-qualified class name.
|
protected Set<String> |
eventTypeAutoNamePackages
Saves the packages to search to resolve event type names.
|
protected Map<String,ConfigurationEventTypeAvro> |
eventTypesAvro
Map of event type name and XML DOM configuration.
|
protected Map<String,ConfigurationEventTypeLegacy> |
eventTypesLegacy
Map of event type name and Legacy-type event configuration.
|
protected Map<String,ConfigurationEventTypeXMLDOM> |
eventTypesXMLDOM
Map of event type name and XML DOM configuration.
|
protected List<String> |
imports
The class and package name imports that
will be used to resolve partial class names.
|
protected Map<String,Properties> |
mapNames
The type names for events that are backed by java.util.Map,
not containing strongly-typed nested maps.
|
protected Map<String,ConfigurationEventTypeMap> |
mapTypeConfigurations
Map event types additional configuration information.
|
protected Map<String,ConfigurationMethodRef> |
methodInvocationReferences
Map of class name and configuration for method invocations on that class.
|
protected Map<String,Map<String,Object>> |
nestableMapNames
The type names for events that are backed by java.util.Map,
possibly containing strongly-typed nested maps.
|
protected Map<String,Map<String,Object>> |
nestableObjectArrayNames
The type names for events that are backed by java.util.Map,
possibly containing strongly-typed nested maps.
|
protected Map<String,ConfigurationEventTypeObjectArray> |
objectArrayTypeConfigurations
Map event types additional configuration information.
|
protected List<ConfigurationPlugInAggregationFunction> |
plugInAggregationFunctions
List of configured plug-in aggregation functions.
|
protected List<ConfigurationPlugInAggregationMultiFunction> |
plugInAggregationMultiFunctions
List of configured plug-in aggregation multi-functions.
|
protected Map<URI,ConfigurationPlugInEventRepresentation> |
plugInEventRepresentation
Map of plug-in event representation name and configuration
|
protected 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 Map<String,ConfigurationPlugInEventType> |
plugInEventTypes
Map of plug-in event types.
|
protected List<ConfigurationPluginLoader> |
pluginLoaders
List of adapter loaders.
|
protected List<ConfigurationPlugInPatternObject> |
plugInPatternObjects
List of configured plug-in pattern objects.
|
protected List<ConfigurationPlugInSingleRowFunction> |
plugInSingleRowFunctions
List of configured plug-in single-row functions.
|
protected List<ConfigurationPlugInView> |
plugInViews
List of configured plug-in views.
|
protected List<ConfigurationPlugInVirtualDataWindow> |
plugInVirtualDataWindows
List of configured plug-in views.
|
protected Map<String,ConfigurationRevisionEventType> |
revisionEventTypes
All revision event types which allow updates to past events.
|
protected Map<String,Object> |
transientConfiguration |
protected Map<String,ConfigurationVariable> |
variables
Map of variables.
|
protected Map<String,ConfigurationVariantStream> |
variantStreams
Variant streams allow events of disparate types to be treated the same.
|
Constructor and Description |
---|
Configuration()
Constructs an empty configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotationImport(Class autoImport)
Add a class to the imports available for annotations only
|
void |
addAnnotationImport(String autoImport)
Adds a package or class to the list of automatically-imported classes and packages for use by annotations only.
|
void |
addDatabaseReference(String name,
ConfigurationDBRef configurationDBRef)
Add a database reference with a given database name.
|
void |
addEventType(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(String eventTypeName,
Class eventClass)
Add an name for an event type represented by Java-bean plain-old Java object events.
|
void |
addEventType(String eventTypeName,
ConfigurationEventTypeXMLDOM xmlDOMEventTypeDesc)
Add an name for an event type that represents org.w3c.dom.Node events.
|
void |
addEventType(String eventTypeName,
Map<String,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(String eventTypeName,
Map<String,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(String eventTypeName,
Map<String,Object> typeMap,
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(String eventTypeName,
Properties typeMap)
Add an name for an event type that represents java.util.Map events.
|
void |
addEventType(String eventTypeName,
String eventClassName)
Add an name for an event type represented by Java-bean plain-old Java object events.
|
void |
addEventType(String eventTypeName,
String[] propertyNames,
Object[] propertyTypes)
Add an event type that represents Object-array (Object[]) events.
|
void |
addEventType(String eventTypeName,
String[] propertyNames,
Object[] propertyTypes,
ConfigurationEventTypeObjectArray config)
Add an event type that represents Object-array (Object[]) events.
|
void |
addEventType(String eventTypeName,
String eventClass,
ConfigurationEventTypeLegacy legacyEventTypeDesc)
Add an name for an event type that represents legacy Java type (non-JavaBean style) events.
|
void |
addEventTypeAutoName(String packageName)
Adds a Java package name of a package that Java event classes reside in.
|
void |
addEventTypeAvro(String eventTypeName,
ConfigurationEventTypeAvro avro)
Adds an Avro event type
|
void |
addImport(Class autoImport)
Adds a class to the list of automatically-imported classes.
|
void |
addImport(String autoImport)
Adds a package or class to the list of automatically-imported classes and packages.
|
void |
addMapConfiguration(String mapeventTypeName,
ConfigurationEventTypeMap config)
Add configuration for a map event type.
|
void |
addMapSuperType(String mapeventTypeName,
String mapSupertypeName)
Add, for a given Map event type identified by the first parameter, the supertype (by its event type name).
|
void |
addMethodRef(Class clazz,
ConfigurationMethodRef methodInvocationConfig)
Adds a cache configuration for a class providing methods for use in the from-clause.
|
void |
addMethodRef(String className,
ConfigurationMethodRef methodInvocationConfig)
Adds a cache configuration for a class providing methods for use in the from-clause.
|
void |
addObjectArrayConfiguration(String objectArrayeventTypeName,
ConfigurationEventTypeObjectArray config)
Add configuration for a object array event type.
|
void |
addObjectArraySuperType(String eventTypeName,
String supertypeName)
Add, for a given Object-array event type identified by the first parameter, the supertype (by its event type name).
|
void |
addPlugInAggregationFunctionFactory(String functionName,
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(URI eventRepresentationRootURI,
Class eventRepresentationClass,
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(URI eventRepresentationRootURI,
String eventRepresentationClassName,
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(String eventTypeName,
URI[] resolutionURIs,
Serializable initializer)
Adds an name for an event type that one of the plug-in event representations resolves to an event type.
|
void |
addPluginLoader(String loaderName,
String className)
Add a plugin loader (f.e.
|
void |
addPluginLoader(String loaderName,
String className,
Properties configuration)
Add a plugin loader (f.e.
|
void |
addPluginLoader(String loaderName,
String className,
Properties configuration,
String configurationXML)
Add a plugin loader (f.e.
|
void |
addPlugInPatternGuard(String namespace,
String name,
String guardFactoryClass)
Add a pattern guard for plug-in.
|
void |
addPlugInPatternObserver(String namespace,
String name,
String observerFactoryClass)
Add a pattern event observer for plug-in.
|
void |
addPlugInSingleRowFunction(ConfigurationPlugInSingleRowFunction singleRowFunction)
Add a plug-in single-row function
|
void |
addPlugInSingleRowFunction(String functionName,
String className,
String methodName)
Adds a plug-in single-row function given a EPL function name, a class name and a method name.
|
void |
addPlugInSingleRowFunction(String functionName,
String className,
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(String functionName,
String className,
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(String functionName,
String className,
String methodName,
ConfigurationPlugInSingleRowFunction.ValueCache valueCache,
ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable)
Add single-row function with configurations.
|
void |
addPlugInSingleRowFunction(String functionName,
String className,
String methodName,
ConfigurationPlugInSingleRowFunction.ValueCache valueCache,
ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable,
boolean rethrowExceptions)
Add single-row function with configurations.
|
void |
addPlugInView(String namespace,
String name,
String viewFactoryClass)
Add a view for plug-in.
|
void |
addPlugInVirtualDataWindow(String namespace,
String name,
String factoryClass)
Add a virtual data window for plug-in.
|
void |
addPlugInVirtualDataWindow(String namespace,
String name,
String factoryClass,
Serializable customConfigurationObject)
Add a virtual data window for plug-in.
|
void |
addRevisionEventType(String revisioneventTypeName,
ConfigurationRevisionEventType revisionEventTypeConfig)
Adds an revision event type.
|
void |
addVariable(String variableName,
Class type,
Object initializationValue)
Add a global variable.
|
void |
addVariable(String variableName,
Class type,
Object initializationValue,
boolean constant)
Add variable that can be a constant.
|
void |
addVariable(String variableName,
String type,
Object initializationValue)
Add a global variable.
|
void |
addVariable(String variableName,
String type,
Object initializationValue,
boolean constant)
Add a global variable, allowing constants.
|
void |
addVariantStream(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(Document document)
Use the mappings and properties specified in the given XML document.
|
Configuration |
configure(File configFile)
Use the configuration specified in the given application
file.
|
Configuration |
configure(String resource)
Use the configuration specified in the given application
resource.
|
Configuration |
configure(URL url)
Use the configuration specified by the given URL.
|
List<String> |
getAnnotationImports()
Returns the class and package imports for annotation-only use.
|
protected static InputStream |
getConfigurationInputStream(String resource)
Get the configuration file as an InputStream.
|
Map<String,ConfigurationDBRef> |
getDatabaseReferences()
Returns a map of string database names to database configuration options.
|
ConfigurationEngineDefaults |
getEngineDefaults()
Returns engine default settings.
|
String |
getEPServicesContextFactoryClassName()
Returns the service context factory class name
|
EventType |
getEventType(String eventTypeName)
Returns the event type for a given event type name.
|
Set<String> |
getEventTypeAutoNamePackages()
Returns a set of Java package names that Java event classes reside in.
|
Map<String,String> |
getEventTypeNames()
Returns the mapping of event type name to Java class name.
|
Set<String> |
getEventTypeNameUsedBy(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.
|
Map<String,ConfigurationEventTypeAvro> |
getEventTypesAvro()
Returns the Avro event types.
|
Map<String,ConfigurationEventTypeLegacy> |
getEventTypesLegacy()
Returns the mapping of event type name to legacy java event type information.
|
Map<String,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.
|
Map<String,Map<String,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.
|
Map<String,Map<String,Object>> |
getEventTypesNestableObjectArrayEvents()
Returns the object-array event types.
|
Map<String,ConfigurationEventTypeXMLDOM> |
getEventTypesXMLDOM()
Returns the mapping of event type name to XML DOM event type information.
|
List<String> |
getImports()
Returns the class and package imports.
|
Map<String,ConfigurationEventTypeMap> |
getMapTypeConfigurations()
Returns for each Map event type name the set of supertype event type names (Map types only).
|
Map<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.
|
Map<String,ConfigurationEventTypeObjectArray> |
getObjectArrayTypeConfigurations()
Returns the object-array event type configurations.
|
List<ConfigurationPlugInAggregationFunction> |
getPlugInAggregationFunctions()
Returns a list of configured plug-in aggregation functions.
|
List<ConfigurationPlugInAggregationMultiFunction> |
getPlugInAggregationMultiFunctions()
Returns a list of configured plug-in multi-function aggregation functions.
|
Map<URI,ConfigurationPlugInEventRepresentation> |
getPlugInEventRepresentation()
Returns a map of plug-in event representation URI and their event representation class and initializer.
|
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.
|
Map<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.
|
List<ConfigurationPluginLoader> |
getPluginLoaders()
Returns a list of configured plugin loaders.
|
List<ConfigurationPlugInPatternObject> |
getPlugInPatternObjects()
Returns a list of configured plug-ins for pattern observers and guards.
|
List<ConfigurationPlugInSingleRowFunction> |
getPlugInSingleRowFunctions()
Returns a list of configured plug-in single-row functions.
|
List<ConfigurationPlugInView> |
getPlugInViews()
Returns a list of configured plug-in views.
|
List<ConfigurationPlugInVirtualDataWindow> |
getPlugInVirtualDataWindows()
Returns a list of configured plug-in virtual data windows.
|
protected static InputStream |
getResourceAsStream(String resource)
Returns an input stream from an application resource in the classpath.
|
Map<String,ConfigurationRevisionEventType> |
getRevisionEventTypes()
Returns a map of revision event type name and revision event type configuration.
|
Map<String,Object> |
getTransientConfiguration()
Returns transient configuration, i.e.
|
Set<String> |
getVariableNameUsedBy(String variableName)
Return the set of statement names of statements that are in started or stopped state and
that reference the given variable name.
|
Map<String,ConfigurationVariable> |
getVariables()
Returns the global variables by name as key and type plus initialization value as value
|
Map<String,ConfigurationVariantStream> |
getVariantStreams()
Returns a map of variant stream name and variant configuration information.
|
boolean |
isEventTypeExists(String eventTypeName)
Checks if an event type has already been registered for that name.
|
boolean |
isVariantStreamExists(String name)
Returns true if a variant stream by the name has been declared, or false if not.
|
boolean |
removeEventType(String eventTypeName,
boolean force)
Remove an event type by its name, returning an indicator whether the event type was found and removed.
|
void |
removeImport(String name)
Remove an import.
|
boolean |
removeVariable(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(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(String epServicesContextFactoryClassName)
Sets the class name of the services context factory class to use.
|
void |
setMatchRecognizeMaxStates(Long maxStates)
Set the current maximum match-recognize state count.
|
void |
setMetricsReportingDisabled()
Disable engine-level metrics reporting.
|
void |
setMetricsReportingEnabled()
Enable engine-level metrics reporting.
|
void |
setMetricsReportingInterval(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(String statementName)
Disable metrics reporting for a given statement.
|
void |
setMetricsReportingStmtEnabled(String statementName)
Enable metrics reporting for the given statement.
|
void |
setPatternMaxSubexpressions(Long maxSubexpressions)
Set the current maximum pattern sub-expression count.
|
void |
setPlugInEventTypeResolutionURIs(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 |
setTransientConfiguration(Map<String,Object> transientConfiguration)
Sets transient configuration, i.e.
|
void |
updateMapEventType(String mapeventTypeName,
Map<String,Object> typeMap)
Updates an existing Map event type with additional properties.
|
void |
updateObjectArrayEventType(String myEvent,
String[] namesNew,
Object[] typesNew)
Updates an existing Object-array event type with additional properties.
|
public static final String ANNOTATION_IMPORT
protected static final String ESPER_DEFAULT_CONFIG
protected Map<String,String> eventClasses
protected Map<String,ConfigurationEventTypeXMLDOM> eventTypesXMLDOM
protected Map<String,ConfigurationEventTypeAvro> eventTypesAvro
protected Map<String,ConfigurationEventTypeLegacy> eventTypesLegacy
protected Map<String,Properties> mapNames
protected Map<String,Map<String,Object>> nestableMapNames
Each entrie's value must be either a Class or a Map<String,Object> to define nested maps.
protected Map<String,Map<String,Object>> nestableObjectArrayNames
Each entrie's value must be either a Class or a Map<String,Object> to define nested maps.
protected Map<String,ConfigurationEventTypeMap> mapTypeConfigurations
protected Map<String,ConfigurationEventTypeObjectArray> objectArrayTypeConfigurations
protected List<String> imports
protected List<String> annotationImports
protected Map<String,ConfigurationDBRef> databaseReferences
protected String epServicesContextFactoryClassName
protected List<ConfigurationPlugInView> plugInViews
protected List<ConfigurationPlugInVirtualDataWindow> plugInVirtualDataWindows
protected List<ConfigurationPlugInPatternObject> plugInPatternObjects
protected List<ConfigurationPlugInAggregationFunction> plugInAggregationFunctions
protected List<ConfigurationPlugInAggregationMultiFunction> plugInAggregationMultiFunctions
protected List<ConfigurationPlugInSingleRowFunction> plugInSingleRowFunctions
protected List<ConfigurationPluginLoader> pluginLoaders
protected ConfigurationEngineDefaults engineDefaults
protected Set<String> eventTypeAutoNamePackages
protected Map<String,ConfigurationVariable> variables
protected Map<String,ConfigurationMethodRef> methodInvocationReferences
protected Map<URI,ConfigurationPlugInEventRepresentation> plugInEventRepresentation
protected Map<String,ConfigurationPlugInEventType> plugInEventTypes
protected URI[] plugInEventTypeResolutionURIs
protected Map<String,ConfigurationRevisionEventType> revisionEventTypes
protected Map<String,ConfigurationVariantStream> variantStreams
public Configuration()
public void setEPServicesContextFactoryClassName(String epServicesContextFactoryClassName)
epServicesContextFactoryClassName
- service context factory class namepublic String getEPServicesContextFactoryClassName()
ConfigurationInformation
getEPServicesContextFactoryClassName
in interface ConfigurationInformation
public void addPlugInAggregationFunctionFactory(String functionName, String aggregationFactoryClassName) throws ConfigurationException
ConfigurationOperations
The same function name cannot be added twice.
addPlugInAggregationFunctionFactory
in interface ConfigurationOperations
functionName
- is the new aggregation function name for use in EPLaggregationFactoryClassName
- is the fully-qualified class name of the class implementing the aggregation function factory interface AggregationFunctionFactory
ConfigurationException
- is thrown to indicate a problem adding the aggregation functionpublic void addPlugInAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction config) throws ConfigurationException
ConfigurationOperations
addPlugInAggregationMultiFunction
in interface ConfigurationOperations
config
- the configurationConfigurationException
- is thrown to indicate a configuration problempublic void addPlugInSingleRowFunction(ConfigurationPlugInSingleRowFunction singleRowFunction)
ConfigurationOperations
addPlugInSingleRowFunction
in interface ConfigurationOperations
singleRowFunction
- configurationpublic void addPlugInSingleRowFunction(String functionName, String className, String methodName) throws ConfigurationException
ConfigurationOperations
The same function name cannot be added twice.
addPlugInSingleRowFunction
in interface ConfigurationOperations
functionName
- is the new single-row function name for use in EPLclassName
- is the fully-qualified class name of the class implementing the single-row functionmethodName
- is the public static method provided by the class that implements the single-row functionConfigurationException
- is thrown to indicate a problem adding the single-row functionpublic void addPlugInSingleRowFunction(String functionName, String className, String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache) throws ConfigurationException
ConfigurationOperations
The same function name cannot be added twice.
addPlugInSingleRowFunction
in interface ConfigurationOperations
functionName
- is the new single-row function name for use in EPLclassName
- is the fully-qualified class name of the class implementing the single-row functionmethodName
- is the public static method provided by the class that implements the single-row functionvalueCache
- set the behavior for caching the return value when constant parameters are providedConfigurationException
- is thrown to indicate a problem adding the single-row functionpublic void addPlugInSingleRowFunction(String functionName, String className, String methodName, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable) throws ConfigurationException
ConfigurationOperations
The same function name cannot be added twice.
addPlugInSingleRowFunction
in interface ConfigurationOperations
functionName
- is the new single-row function name for use in EPLclassName
- is the fully-qualified class name of the class implementing the single-row functionmethodName
- is the public static method provided by the class that implements the single-row functionfilterOptimizable
- whether the single-row function, when used in filters, may be subject to reverse index lookup based on the function resultConfigurationException
- is thrown to indicate a problem adding the single-row functionpublic Map<String,Object> getTransientConfiguration()
getTransientConfiguration
in interface ConfigurationInformation
getTransientConfiguration
in interface ConfigurationOperations
public void setTransientConfiguration(Map<String,Object> transientConfiguration)
transientConfiguration
- map of transientspublic void addPlugInSingleRowFunction(String functionName, String className, String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable) throws ConfigurationException
functionName
- EPL name of functionclassName
- providing fully-qualified class namemethodName
- providing method namevalueCache
- value cache settingsfilterOptimizable
- settings whether subject to optimizationsConfigurationException
- thrown to indicate that the configuration is invalidpublic void addPlugInSingleRowFunction(String functionName, String className, String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable, boolean rethrowExceptions) throws ConfigurationException
addPlugInSingleRowFunction
in interface ConfigurationOperations
functionName
- EPL name of functionclassName
- providing fully-qualified class namemethodName
- providing method namevalueCache
- value cache settingsfilterOptimizable
- settings whether subject to optimizationsrethrowExceptions
- whether exceptions generated by the UDF are rethrownConfigurationException
- thrown to indicate that the configuration is invalidpublic boolean isEventTypeExists(String eventTypeName)
isEventTypeExists
in interface ConfigurationOperations
eventTypeName
- the namepublic void addEventType(String eventTypeName, String eventClassName)
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typeeventClassName
- fully-qualified class name of the event typepublic void addEventType(String eventTypeName, Class eventClass)
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typeeventClass
- is the Java event class for which to add the namepublic void addEventType(Class eventClass)
addEventType
in interface ConfigurationOperations
eventClass
- is the Java event class for which to add the namepublic void addEventType(String eventTypeName, Properties typeMap)
Each entry in the type map is the property name and the fully-qualified Java class name or primitive type name.
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typetypeMap
- maps the name of each property in the Map event to the type
(fully qualified classname) of its value in Map event instances.public void addEventType(String eventTypeName, Map<String,Object> typeMap)
ConfigurationOperations
Each entry in the type mapping must contain the String property name as the key value, and either a Class, or a further Map<String, Object>, or the name of another previously-register Map event type (append [] for array of Map).
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typetypeMap
- maps the name of each property in the Map event to the type
(fully qualified classname) of its value in Map event instances.public void addEventType(String eventTypeName, Map<String,Object> typeMap, String[] superTypes)
ConfigurationOperations
Each entry in the type mapping must contain the String property name as the key value, and either a Class, or a further Map<String, Object>, or the name of another previously-register Map event type (append [] for array of Map).
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typetypeMap
- 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 thispublic void addEventType(String eventTypeName, Map<String,Object> typeMap, ConfigurationEventTypeMap mapConfig) throws ConfigurationException
ConfigurationOperations
Each entry in the type mapping must contain the String property name as the key value, and either a Class, or a further Map<String, Object>, or the name of another previously-register Map event type (append [] for array of Map).
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typetypeMap
- 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.ConfigurationException
- if the name is already in used for a different typepublic void addMapSuperType(String mapeventTypeName, String mapSupertypeName)
Each Map event type may have any number of supertypes, each supertype must also be of a Map-type event.
mapeventTypeName
- the name of a Map event type, that is to have a supertypemapSupertypeName
- the name of a Map event type that is the supertypepublic void addObjectArraySuperType(String eventTypeName, String supertypeName)
Each Object array event type may have any number of supertypes, each supertype must also be of a Object-array-type event.
eventTypeName
- the name of a Map event type, that is to have a supertypesupertypeName
- the name of a Map event type that is the supertypepublic void addMapConfiguration(String mapeventTypeName, ConfigurationEventTypeMap config)
mapeventTypeName
- configuration to addconfig
- map type configurationpublic void addObjectArrayConfiguration(String objectArrayeventTypeName, ConfigurationEventTypeObjectArray config)
objectArrayeventTypeName
- configuration to addconfig
- map type configurationpublic void addEventType(String eventTypeName, ConfigurationEventTypeXMLDOM xmlDOMEventTypeDesc)
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typexmlDOMEventTypeDesc
- descriptor containing property and mapping information for XML-DOM eventspublic void addEventType(String eventTypeName, String[] propertyNames, Object[] propertyTypes) throws ConfigurationException
ConfigurationOperations
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typepropertyNames
- name of each property, length must match number of typespropertyTypes
- type of each property, length must match number of namesConfigurationException
- if the name is already in used for a different typepublic void addEventType(String eventTypeName, String[] propertyNames, Object[] propertyTypes, ConfigurationEventTypeObjectArray config) throws ConfigurationException
ConfigurationOperations
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typepropertyNames
- name of each property, length must match number of typespropertyTypes
- type of each property, length must match number of namesconfig
- object-array type configurationConfigurationException
- if the name is already in used for a different typepublic void addRevisionEventType(String revisioneventTypeName, ConfigurationRevisionEventType revisionEventTypeConfig)
ConfigurationOperations
addRevisionEventType
in interface ConfigurationOperations
revisioneventTypeName
- the name of the revision event typerevisionEventTypeConfig
- the configurationpublic void addDatabaseReference(String name, ConfigurationDBRef configurationDBRef)
name
- is the database nameconfigurationDBRef
- descriptor containing database connection and access policy informationpublic void addEventType(String eventTypeName, String eventClass, ConfigurationEventTypeLegacy legacyEventTypeDesc)
addEventType
in interface ConfigurationOperations
eventTypeName
- is the name for the event typeeventClass
- fully-qualified class name of the event typelegacyEventTypeDesc
- descriptor containing property and mapping information for Legacy Java type eventspublic void addImport(String autoImport)
ConfigurationOperations
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, specify a package
with wildcard, such as com.mycompany.staticlib.*
.
addImport
in interface ConfigurationOperations
autoImport
- is a fully-qualified class name or a package name with wildcardpublic void addImport(Class autoImport)
ConfigurationOperations
Use #addImport(String) to import a package.
addImport
in interface ConfigurationOperations
autoImport
- is a class to importpublic void addAnnotationImport(String autoImport)
ConfigurationOperations
addAnnotationImport
in interface ConfigurationOperations
autoImport
- import such as package name, class name, or package with ".*".public void addAnnotationImport(Class autoImport)
autoImport
- class to addpublic void removeImport(String name)
name
- to removepublic void addMethodRef(String className, ConfigurationMethodRef methodInvocationConfig)
className
- is the class name (simple or fully-qualified) providing methodsmethodInvocationConfig
- is the cache configurationpublic void addMethodRef(Class clazz, ConfigurationMethodRef methodInvocationConfig)
clazz
- is the class providing methodsmethodInvocationConfig
- is the cache configurationpublic Map<String,String> getEventTypeNames()
ConfigurationInformation
getEventTypeNames
in interface ConfigurationInformation
public Map<String,Properties> getEventTypesMapEvents()
ConfigurationInformation
getEventTypesMapEvents
in interface ConfigurationInformation
public Map<String,Map<String,Object>> getEventTypesNestableMapEvents()
ConfigurationInformation
getEventTypesNestableMapEvents
in interface ConfigurationInformation
public Map<String,Map<String,Object>> getEventTypesNestableObjectArrayEvents()
ConfigurationInformation
getEventTypesNestableObjectArrayEvents
in interface ConfigurationInformation
public Map<String,ConfigurationEventTypeXMLDOM> getEventTypesXMLDOM()
ConfigurationInformation
getEventTypesXMLDOM
in interface ConfigurationInformation
public Map<String,ConfigurationEventTypeAvro> getEventTypesAvro()
ConfigurationInformation
getEventTypesAvro
in interface ConfigurationInformation
public Map<String,ConfigurationEventTypeLegacy> getEventTypesLegacy()
ConfigurationInformation
getEventTypesLegacy
in interface ConfigurationInformation
public List<String> getImports()
ConfigurationInformation
getImports
in interface ConfigurationInformation
public List<String> getAnnotationImports()
ConfigurationInformation
getAnnotationImports
in interface ConfigurationInformation
public Map<String,ConfigurationDBRef> getDatabaseReferences()
ConfigurationInformation
getDatabaseReferences
in interface ConfigurationInformation
public List<ConfigurationPlugInView> getPlugInViews()
ConfigurationInformation
getPlugInViews
in interface ConfigurationInformation
public Map<String,ConfigurationEventTypeObjectArray> getObjectArrayTypeConfigurations()
ConfigurationInformation
getObjectArrayTypeConfigurations
in interface ConfigurationInformation
public List<ConfigurationPlugInVirtualDataWindow> getPlugInVirtualDataWindows()
ConfigurationInformation
getPlugInVirtualDataWindows
in interface ConfigurationInformation
public List<ConfigurationPluginLoader> getPluginLoaders()
ConfigurationInformation
getPluginLoaders
in interface ConfigurationInformation
public List<ConfigurationPlugInAggregationFunction> getPlugInAggregationFunctions()
ConfigurationInformation
getPlugInAggregationFunctions
in interface ConfigurationInformation
public List<ConfigurationPlugInAggregationMultiFunction> getPlugInAggregationMultiFunctions()
ConfigurationInformation
getPlugInAggregationMultiFunctions
in interface ConfigurationInformation
public List<ConfigurationPlugInSingleRowFunction> getPlugInSingleRowFunctions()
ConfigurationInformation
getPlugInSingleRowFunctions
in interface ConfigurationInformation
public List<ConfigurationPlugInPatternObject> getPlugInPatternObjects()
ConfigurationInformation
getPlugInPatternObjects
in interface ConfigurationInformation
public Map<String,ConfigurationVariable> getVariables()
ConfigurationInformation
getVariables
in interface ConfigurationInformation
public Map<String,ConfigurationMethodRef> getMethodInvocationReferences()
ConfigurationInformation
getMethodInvocationReferences
in interface ConfigurationInformation
public Map<String,ConfigurationRevisionEventType> getRevisionEventTypes()
ConfigurationInformation
getRevisionEventTypes
in interface ConfigurationInformation
public Map<String,ConfigurationEventTypeMap> getMapTypeConfigurations()
ConfigurationInformation
getMapTypeConfigurations
in interface ConfigurationInformation
public void addPluginLoader(String loaderName, String className, Properties configuration)
The class is expected to implement PluginLoader
loaderName
- is the name of the loaderclassName
- is the fully-qualified classname of the loader classconfiguration
- is loader cofiguration entriespublic void addPluginLoader(String loaderName, String className)
The class is expected to implement PluginLoader
loaderName
- is the name of the loaderclassName
- is the fully-qualified classname of the loader classpublic void addPluginLoader(String loaderName, String className, Properties configuration, String configurationXML)
The class is expected to implement PluginLoader
loaderName
- is the name of the loaderclassName
- is the fully-qualified classname of the loader classconfiguration
- is loader cofiguration entriesconfigurationXML
- config xml if anypublic void addPlugInView(String namespace, String name, String viewFactoryClass)
addPlugInView
in interface ConfigurationOperations
namespace
- is the namespace the view should be available undername
- is the name of the viewviewFactoryClass
- is the view factory class to usepublic void addPlugInVirtualDataWindow(String namespace, String name, String factoryClass)
namespace
- is the namespace the virtual data window should be available undername
- is the name of the data windowfactoryClass
- is the view factory class to usepublic void addPlugInVirtualDataWindow(String namespace, String name, String factoryClass, Serializable customConfigurationObject)
namespace
- is the namespace the virtual data window should be available undername
- is the name of the data windowfactoryClass
- is the view factory class to usecustomConfigurationObject
- additional configuration to be passed alongpublic void addPlugInPatternObserver(String namespace, String name, String observerFactoryClass)
namespace
- is the namespace the observer should be available undername
- is the name of the observerobserverFactoryClass
- is the observer factory class to usepublic void addPlugInPatternGuard(String namespace, String name, String guardFactoryClass)
namespace
- is the namespace the guard should be available undername
- is the name of the guardguardFactoryClass
- is the guard factory class to usepublic void addEventTypeAutoName(String packageName)
ConfigurationOperations
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.
addEventTypeAutoName
in interface ConfigurationOperations
packageName
- is the fully-qualified Java package name of the Java package that event classes reside inpublic void addVariable(String variableName, Class type, Object initializationValue)
ConfigurationOperations
Use the runtime API to set variable values or EPL statements to change variable values.
addVariable
in interface ConfigurationOperations
variableName
- name of the variable to addtype
- 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
.public void addVariable(String variableName, Class type, Object initializationValue, boolean constant)
variableName
- name of variabletype
- variable typeinitializationValue
- initial valueconstant
- constant indicatorpublic void addVariable(String variableName, String type, Object initializationValue) throws ConfigurationException
ConfigurationOperations
Use the runtime API to set variable values or EPL statements to change variable values.
addVariable
in interface ConfigurationOperations
variableName
- name of the variable to addtype
- 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
.ConfigurationException
- if the type and initialization value don't match or the variable name
is already in usepublic void addVariable(String variableName, String type, Object initializationValue, boolean constant) throws ConfigurationException
ConfigurationOperations
Use the runtime API to set variable values or EPL statements to change variable values.
addVariable
in interface ConfigurationOperations
variableName
- name of the variable to addtype
- 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 constantConfigurationException
- if the type and initialization value don't match or the variable name
is already in usepublic void addPlugInEventRepresentation(URI eventRepresentationRootURI, String eventRepresentationClassName, Serializable initializer)
eventRepresentationRootURI
- uniquely identifies the event representation and acts as a parent
for child URIs used in resolvingeventRepresentationClassName
- is the name of the class implementing PlugInEventRepresentation
.initializer
- is optional configuration or initialization information, or null if none requiredpublic void addPlugInEventRepresentation(URI eventRepresentationRootURI, Class eventRepresentationClass, Serializable initializer)
eventRepresentationRootURI
- uniquely identifies the event representation and acts as a parent
for child URIs used in resolvingeventRepresentationClass
- is the class implementing PlugInEventRepresentation
.initializer
- is optional configuration or initialization information, or null if none requiredpublic void addPlugInEventType(String eventTypeName, URI[] resolutionURIs, Serializable initializer)
ConfigurationOperations
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.
addPlugInEventType
in interface ConfigurationOperations
eventTypeName
- is the name of the event typeresolutionURIs
- is URIs that are matched to registered event representationsinitializer
- is an optional value for parameterizing or configuring the event typepublic void setPlugInEventTypeResolutionURIs(URI[] urisToResolveName)
ConfigurationOperations
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.
setPlugInEventTypeResolutionURIs
in interface ConfigurationOperations
urisToResolveName
- URIs for resolving the namepublic URI[] getPlugInEventTypeResolutionURIs()
ConfigurationInformation
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.
getPlugInEventTypeResolutionURIs
in interface ConfigurationInformation
public Map<URI,ConfigurationPlugInEventRepresentation> getPlugInEventRepresentation()
ConfigurationInformation
getPlugInEventRepresentation
in interface ConfigurationInformation
public Map<String,ConfigurationPlugInEventType> getPlugInEventTypes()
ConfigurationInformation
getPlugInEventTypes
in interface ConfigurationInformation
public Set<String> getEventTypeAutoNamePackages()
ConfigurationInformation
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.
getEventTypeAutoNamePackages
in interface ConfigurationInformation
public ConfigurationEngineDefaults getEngineDefaults()
ConfigurationInformation
getEngineDefaults
in interface ConfigurationInformation
public void addVariantStream(String varianteventTypeName, ConfigurationVariantStream variantStreamConfig)
ConfigurationOperations
addVariantStream
in interface ConfigurationOperations
varianteventTypeName
- is the name of the variant streamvariantStreamConfig
- the configuration such as variant type names and any-type settingpublic Map<String,ConfigurationVariantStream> getVariantStreams()
ConfigurationInformation
getVariantStreams
in interface ConfigurationInformation
public void updateMapEventType(String mapeventTypeName, Map<String,Object> typeMap) throws ConfigurationException
ConfigurationOperations
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<String, Object> 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.
updateMapEventType
in interface ConfigurationOperations
mapeventTypeName
- the name of the map event type to updatetypeMap
- a Map of string property name and typeConfigurationException
- if the event type name could not be found or is not a Mappublic void updateObjectArrayEventType(String myEvent, String[] namesNew, Object[] typesNew)
ConfigurationOperations
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.
updateObjectArrayEventType
in interface ConfigurationOperations
myEvent
- the name of the object-array event type to updatenamesNew
- property namestypesNew
- property typespublic void replaceXMLEventType(String xmlEventTypeName, ConfigurationEventTypeXMLDOM config) throws ConfigurationException
ConfigurationOperations
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.
replaceXMLEventType
in interface ConfigurationOperations
xmlEventTypeName
- the name of the XML event typeconfig
- the new type configurationConfigurationException
- thrown when the type information change failedpublic Set<String> getEventTypeNameUsedBy(String name)
ConfigurationOperations
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.
getEventTypeNameUsedBy
in interface ConfigurationOperations
name
- name of the event typepublic boolean isVariantStreamExists(String name)
ConfigurationOperations
isVariantStreamExists
in interface ConfigurationOperations
name
- of variant streampublic void setMetricsReportingInterval(String stmtGroupName, long newInterval)
ConfigurationOperations
setMetricsReportingInterval
in interface ConfigurationOperations
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 disablepublic void setMetricsReportingStmtEnabled(String statementName)
ConfigurationOperations
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.
setMetricsReportingStmtEnabled
in interface ConfigurationOperations
statementName
- for which to enable metrics reportingpublic void setMetricsReportingStmtDisabled(String statementName)
ConfigurationOperations
setMetricsReportingStmtDisabled
in interface ConfigurationOperations
statementName
- for which to disable metrics reportingpublic EventType getEventType(String eventTypeName)
ConfigurationOperations
This operation is not available for static configuration and is only available for runtime use.
getEventType
in interface ConfigurationOperations
eventTypeName
- to return event type forpublic EventType[] getEventTypes()
ConfigurationOperations
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.
getEventTypes
in interface ConfigurationOperations
public void setMetricsReportingEnabled()
ConfigurationOperations
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.
setMetricsReportingEnabled
in interface ConfigurationOperations
public void setMetricsReportingDisabled()
ConfigurationOperations
Use this operation to control, at runtime, metrics reporting globally. Setting metrics reporting to disabled removes all performance cost for metrics reporting.
setMetricsReportingDisabled
in interface ConfigurationOperations
public void setPatternMaxSubexpressions(Long maxSubexpressions)
ConfigurationOperations
Use null to indicate that there is no current maximum.
setPatternMaxSubexpressions
in interface ConfigurationOperations
maxSubexpressions
- to setpublic void setMatchRecognizeMaxStates(Long maxStates)
ConfigurationOperations
Use null to indicate that there is no current maximum.
setMatchRecognizeMaxStates
in interface ConfigurationOperations
maxStates
- to setpublic Configuration configure() throws EPException
EPException
- thrown to indicate error reading configurationpublic Configuration configure(String resource) throws EPException
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.
resource
- if the file name of the resourceEPException
- thrown to indicate error reading configurationprotected static InputStream getConfigurationInputStream(String resource) throws EPException
See getResourceAsStream for information on how the resource name is resolved.
resource
- is the resource nameEPException
- thrown to indicate error reading configurationpublic Configuration configure(URL url) throws EPException
url
- URL from which you wish to load the configurationEPException
- is thrown when the URL could not be accesspublic Configuration configure(File configFile) throws EPException
configFile
- File from which you wish to load the configurationEPException
- when the file could not be foundpublic boolean removeEventType(String eventTypeName, boolean force) throws ConfigurationException
ConfigurationOperations
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.
removeEventType
in interface ConfigurationOperations
eventTypeName
- the name of the event type to removeforce
- 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 typeConfigurationException
- thrown to indicate that the remove operation failedpublic Set<String> getVariableNameUsedBy(String variableName)
ConfigurationOperations
A reference counts as any mention of the variable in any expression.
getVariableNameUsedBy
in interface ConfigurationOperations
variableName
- name of the variablepublic boolean removeVariable(String name, boolean force) throws ConfigurationException
ConfigurationOperations
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.
removeVariable
in interface ConfigurationOperations
name
- the name of the variable to removeforce
- 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 variableConfigurationException
- thrown to indicate that the remove operation failedpublic void addEventTypeAvro(String eventTypeName, ConfigurationEventTypeAvro avro)
ConfigurationOperations
addEventTypeAvro
in interface ConfigurationOperations
eventTypeName
- type nameavro
- configspublic Configuration configure(Document document) throws EPException
document
- an XML document from which you wish to load the configurationEPException
- if there is problem in accessing the document.protected static InputStream getResourceAsStream(String resource)
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.
resource
- to get input stream forprotected void reset()