Class ConfigurationCompiler
java.lang.Object
com.espertech.esper.common.client.configuration.compiler.ConfigurationCompiler
- All Implemented Interfaces:
Serializable
Contains settings that apply to the compiler only (and that do not apply at runtime).
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionList of configured plug-in aggregation functions.List of configured plug-in aggregation multi-functions.protected List<ConfigurationCompilerPlugInDateTimeMethod>
List of configured plug-in date-time-methods.protected List<ConfigurationCompilerPlugInEnumMethod>
List of configured plug-in enum-methods.protected List<ConfigurationCompilerPlugInPatternObject>
List of configured plug-in pattern objects.protected List<ConfigurationCompilerPlugInSingleRowFunction>
List of configured plug-in single-row functions.protected List<ConfigurationCompilerPlugInView>
List of configured plug-in views.protected List<ConfigurationCompilerPlugInVirtualDataWindow>
List of configured plug-in views. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlugInAggregationFunctionForge
(String functionName, String aggregationForgeClassName) Adds a plug-in aggregation function given a EPL function name and an aggregation forge class name.void
Adds a plug-in aggregation multi-function.void
addPlugInDateTimeMethod
(String dateTimeMethodName, String dateTimeMethodForgeFactoryClassName) Add a plug-in date-time methodvoid
addPlugInEnumMethod
(String enumMethodName, String enumMethodForgeFactoryClassName) Add a plug-in enum methodvoid
addPlugInPatternGuard
(String namespace, String name, String guardForgeClass) Add a pattern guard for plug-in.void
addPlugInPatternObserver
(String namespace, String name, String observerForgeClass) Add a pattern event observer for plug-in.void
addPlugInSingleRowFunction
(ConfigurationCompilerPlugInSingleRowFunction singleRowFunction) Add a plug-in single-row functionvoid
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, ConfigurationCompilerPlugInSingleRowFunction.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, ConfigurationCompilerPlugInSingleRowFunction.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, ConfigurationCompilerPlugInSingleRowFunction.ValueCache valueCache, ConfigurationCompilerPlugInSingleRowFunction.FilterOptimizable filterOptimizable) Add single-row function with configurations.void
addPlugInSingleRowFunction
(String functionName, String className, String methodName, ConfigurationCompilerPlugInSingleRowFunction.ValueCache valueCache, ConfigurationCompilerPlugInSingleRowFunction.FilterOptimizable filterOptimizable, boolean rethrowExceptions) Add single-row function with configurations.void
addPlugInView
(String namespace, String name, String viewForgeClass) Add a view for plug-in.void
addPlugInVirtualDataWindow
(String namespace, String name, String forgeClass) Add a virtual data window for plug-in.void
addPlugInVirtualDataWindow
(String namespace, String name, String forgeClass, Serializable customConfigurationObject) Add a virtual data window for plug-in.Returns code generation settingsReturns statement execution-related settings, settings that influence event/schedule to statement processing.Returns the expression-related settings for compiler.Returns the language-related settings.Returns logging settings applicable to compiler.Returns the list of plug-in aggregation functions.Returns the list of plug-in aggregation multi-functions.Returns the list of plug-in date-time methodsReturns the list of plug-in enum-methodsReturns the list of plug-in pattern objects.Returns the list of plug-in single-row functions.Returns the list of plug-in views.Returns the list of plug-in virtual data windows.Returns script settings.getSerde()
Returns the serializer and de-serializer -related settingsReturns settings applicable to streams (insert and remove, insert only or remove only) selected for a statement.Returns view resources defaults.protected void
reset()
Reset to an empty configuration.void
setByteCode
(ConfigurationCompilerByteCode byteCode) Sets code generation settingsvoid
setScripts
(ConfigurationCompilerScripts scripts) Sets script settings.void
Sets the serializer and de-serializer -related settings
-
Field Details
-
plugInViews
List of configured plug-in views. -
plugInVirtualDataWindows
List of configured plug-in views. -
plugInPatternObjects
List of configured plug-in pattern objects. -
plugInAggregationFunctions
List of configured plug-in aggregation functions. -
plugInAggregationMultiFunctions
List of configured plug-in aggregation multi-functions. -
plugInSingleRowFunctions
List of configured plug-in single-row functions. -
plugInDateTimeMethods
List of configured plug-in date-time-methods. -
plugInEnumMethods
List of configured plug-in enum-methods.
-
-
Constructor Details
-
ConfigurationCompiler
public ConfigurationCompiler()Constructs an empty configuration. The auto import values are set by default to java.lang, java.math, java.text and java.util.
-
-
Method Details
-
addPlugInAggregationFunctionForge
public void addPlugInAggregationFunctionForge(String functionName, String aggregationForgeClassName) Adds a plug-in aggregation function given a EPL function name and an aggregation forge class name.The same function name cannot be added twice.
- Parameters:
functionName
- is the new aggregation function name for use in EPLaggregationForgeClassName
- is the fully-qualified class name of the class implementing the aggregation function forge interface- Throws:
ConfigurationException
- is thrown to indicate a problem adding the aggregation function
-
addPlugInAggregationMultiFunction
public void addPlugInAggregationMultiFunction(ConfigurationCompilerPlugInAggregationMultiFunction config) Adds a plug-in aggregation multi-function.- Parameters:
config
- the configuration
-
addPlugInSingleRowFunction
public void addPlugInSingleRowFunction(ConfigurationCompilerPlugInSingleRowFunction singleRowFunction) Add a plug-in single-row function- Parameters:
singleRowFunction
- configuration
-
addPlugInSingleRowFunction
Adds a plug-in single-row function given a EPL function name, a class name and a method name.The same function name cannot be added twice.
- Parameters:
functionName
- is the new single-row function name for use in 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 function- Throws:
ConfigurationException
- is thrown to indicate a problem adding the single-row function
-
addPlugInSingleRowFunction
public void addPlugInSingleRowFunction(String functionName, String className, String methodName, ConfigurationCompilerPlugInSingleRowFunction.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.The same function name cannot be added twice.
- Parameters:
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 provided
-
addPlugInSingleRowFunction
public void addPlugInSingleRowFunction(String functionName, String className, String methodName, ConfigurationCompilerPlugInSingleRowFunction.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.The same function name cannot be added twice.
- Parameters:
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 result
-
addPlugInSingleRowFunction
public void addPlugInSingleRowFunction(String functionName, String className, String methodName, ConfigurationCompilerPlugInSingleRowFunction.ValueCache valueCache, ConfigurationCompilerPlugInSingleRowFunction.FilterOptimizable filterOptimizable) Add single-row function with configurations.- Parameters:
functionName
- EPL name of functionclassName
- providing fully-qualified class namemethodName
- providing method namevalueCache
- value cache settingsfilterOptimizable
- settings whether subject to optimizations
-
addPlugInSingleRowFunction
public void addPlugInSingleRowFunction(String functionName, String className, String methodName, ConfigurationCompilerPlugInSingleRowFunction.ValueCache valueCache, ConfigurationCompilerPlugInSingleRowFunction.FilterOptimizable filterOptimizable, boolean rethrowExceptions) Add single-row function with configurations.- Parameters:
functionName
- EPL name of functionclassName
- providing fully-qualified class namemethodName
- providing method namevalueCache
- value cache settingsfilterOptimizable
- settings whether subject to optimizationsrethrowExceptions
- whether to rethrow exceptions
-
getPlugInViews
Returns the list of plug-in views.- Returns:
- plug-in views
-
getPlugInVirtualDataWindows
Returns the list of plug-in virtual data windows.- Returns:
- plug-in virtual data windows
-
getPlugInAggregationFunctions
Returns the list of plug-in aggregation functions.- Returns:
- plug-in aggregation functions
-
getPlugInAggregationMultiFunctions
public List<ConfigurationCompilerPlugInAggregationMultiFunction> getPlugInAggregationMultiFunctions()Returns the list of plug-in aggregation multi-functions.- Returns:
- plug-in aggregation multi-functions
-
getPlugInSingleRowFunctions
Returns the list of plug-in single-row functions.- Returns:
- plug-in single-row functions
-
getPlugInPatternObjects
Returns the list of plug-in pattern objects.- Returns:
- plug-in pattern objects
-
addPlugInView
Add a view for plug-in.- Parameters:
namespace
- is the namespace the view should be available undername
- is the name of the viewviewForgeClass
- is the view forge class to use
-
addPlugInVirtualDataWindow
Add a virtual data window for plug-in.- Parameters:
namespace
- is the namespace the virtual data window should be available undername
- is the name of the data windowforgeClass
- is the view forge class to use
-
addPlugInVirtualDataWindow
public void addPlugInVirtualDataWindow(String namespace, String name, String forgeClass, Serializable customConfigurationObject) Add a virtual data window for plug-in.- Parameters:
namespace
- is the namespace the virtual data window should be available undername
- is the name of the data windowforgeClass
- is the view forge class to usecustomConfigurationObject
- additional configuration to be passed along
-
addPlugInPatternObserver
Add a pattern event observer for plug-in.- Parameters:
namespace
- is the namespace the observer should be available undername
- is the name of the observerobserverForgeClass
- is the observer forge class to use
-
addPlugInPatternGuard
Add a pattern guard for plug-in.- Parameters:
namespace
- is the namespace the guard should be available undername
- is the name of the guardguardForgeClass
- is the guard forge class to use
-
getByteCode
Returns code generation settings- Returns:
- code generation settings
-
setByteCode
Sets code generation settings- Parameters:
byteCode
- settings
-
getStreamSelection
Returns settings applicable to streams (insert and remove, insert only or remove only) selected for a statement.- Returns:
- stream selection defaults
-
getViewResources
Returns view resources defaults.- Returns:
- view resources defaults
-
getLogging
Returns logging settings applicable to compiler.- Returns:
- logging settings
-
getExpression
Returns the expression-related settings for compiler.- Returns:
- expression-related settings
-
getExecution
Returns statement execution-related settings, settings that influence event/schedule to statement processing.- Returns:
- execution settings
-
getScripts
Returns script settings.- Returns:
- script settings
-
setScripts
Sets script settings.- Parameters:
scripts
- script settings
-
getLanguage
Returns the language-related settings.- Returns:
- language-related settings
-
getSerde
Returns the serializer and de-serializer -related settings- Returns:
- serde settings
-
setSerde
Sets the serializer and de-serializer -related settings- Parameters:
serde
- serde settings
-
addPlugInDateTimeMethod
public void addPlugInDateTimeMethod(String dateTimeMethodName, String dateTimeMethodForgeFactoryClassName) Add a plug-in date-time method- Parameters:
dateTimeMethodName
- method namedateTimeMethodForgeFactoryClassName
- fully-qualified forge class name
-
addPlugInEnumMethod
Add a plug-in enum method- Parameters:
enumMethodName
- method nameenumMethodForgeFactoryClassName
- fully-qualified forge class name
-
getPlugInDateTimeMethods
Returns the list of plug-in date-time methods- Returns:
- plug-in date-time methods
-
getPlugInEnumMethods
Returns the list of plug-in enum-methods- Returns:
- plug-in enum methods
-
reset
protected void reset()Reset to an empty configuration.
-