Class ConfigurationCompiler

java.lang.Object
com.espertech.esper.common.client.configuration.compiler.ConfigurationCompiler
All Implemented Interfaces:
Serializable

public class ConfigurationCompiler extends Object implements Serializable
Contains settings that apply to the compiler only (and that do not apply at runtime).
See Also:
  • Field Details

  • 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 EPL
      aggregationForgeClassName - 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

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

      The same function name cannot be added twice.

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

      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 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
    • 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 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
    • 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 function
      className - providing fully-qualified class name
      methodName - providing method name
      valueCache - value cache settings
      filterOptimizable - 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 function
      className - providing fully-qualified class name
      methodName - providing method name
      valueCache - value cache settings
      filterOptimizable - settings whether subject to optimizations
      rethrowExceptions - whether to rethrow exceptions
    • getPlugInViews

      public List<ConfigurationCompilerPlugInView> getPlugInViews()
      Returns the list of plug-in views.
      Returns:
      plug-in views
    • getPlugInVirtualDataWindows

      public List<ConfigurationCompilerPlugInVirtualDataWindow> getPlugInVirtualDataWindows()
      Returns the list of plug-in virtual data windows.
      Returns:
      plug-in virtual data windows
    • getPlugInAggregationFunctions

      public List<ConfigurationCompilerPlugInAggregationFunction> 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

      public List<ConfigurationCompilerPlugInSingleRowFunction> getPlugInSingleRowFunctions()
      Returns the list of plug-in single-row functions.
      Returns:
      plug-in single-row functions
    • getPlugInPatternObjects

      public List<ConfigurationCompilerPlugInPatternObject> getPlugInPatternObjects()
      Returns the list of plug-in pattern objects.
      Returns:
      plug-in pattern objects
    • addPlugInView

      public void addPlugInView(String namespace, String name, String viewForgeClass)
      Add a view for plug-in.
      Parameters:
      namespace - is the namespace the view should be available under
      name - is the name of the view
      viewForgeClass - is the view forge class to use
    • addPlugInVirtualDataWindow

      public void addPlugInVirtualDataWindow(String namespace, String name, String forgeClass)
      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
      forgeClass - 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 under
      name - is the name of the data window
      forgeClass - is the view forge class to use
      customConfigurationObject - additional configuration to be passed along
    • addPlugInPatternObserver

      public void addPlugInPatternObserver(String namespace, String name, String observerForgeClass)
      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
      observerForgeClass - is the observer forge class to use
    • addPlugInPatternGuard

      public void addPlugInPatternGuard(String namespace, String name, String guardForgeClass)
      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
      guardForgeClass - is the guard forge class to use
    • getByteCode

      public ConfigurationCompilerByteCode getByteCode()
      Returns code generation settings
      Returns:
      code generation settings
    • setByteCode

      public void setByteCode(ConfigurationCompilerByteCode byteCode)
      Sets code generation settings
      Parameters:
      byteCode - settings
    • getStreamSelection

      public ConfigurationCompilerStreamSelection getStreamSelection()
      Returns settings applicable to streams (insert and remove, insert only or remove only) selected for a statement.
      Returns:
      stream selection defaults
    • getViewResources

      public ConfigurationCompilerViewResources getViewResources()
      Returns view resources defaults.
      Returns:
      view resources defaults
    • getLogging

      public ConfigurationCompilerLogging getLogging()
      Returns logging settings applicable to compiler.
      Returns:
      logging settings
    • getExpression

      public ConfigurationCompilerExpression getExpression()
      Returns the expression-related settings for compiler.
      Returns:
      expression-related settings
    • getExecution

      public ConfigurationCompilerExecution getExecution()
      Returns statement execution-related settings, settings that influence event/schedule to statement processing.
      Returns:
      execution settings
    • getScripts

      public ConfigurationCompilerScripts getScripts()
      Returns script settings.
      Returns:
      script settings
    • setScripts

      public void setScripts(ConfigurationCompilerScripts scripts)
      Sets script settings.
      Parameters:
      scripts - script settings
    • getLanguage

      public ConfigurationCompilerLanguage getLanguage()
      Returns the language-related settings.
      Returns:
      language-related settings
    • getSerde

      public ConfigurationCompilerSerde getSerde()
      Returns the serializer and de-serializer -related settings
      Returns:
      serde settings
    • setSerde

      public void setSerde(ConfigurationCompilerSerde serde)
      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 name
      dateTimeMethodForgeFactoryClassName - fully-qualified forge class name
    • addPlugInEnumMethod

      public void addPlugInEnumMethod(String enumMethodName, String enumMethodForgeFactoryClassName)
      Add a plug-in enum method
      Parameters:
      enumMethodName - method name
      enumMethodForgeFactoryClassName - fully-qualified forge class name
    • getPlugInDateTimeMethods

      public List<ConfigurationCompilerPlugInDateTimeMethod> getPlugInDateTimeMethods()
      Returns the list of plug-in date-time methods
      Returns:
      plug-in date-time methods
    • getPlugInEnumMethods

      public List<ConfigurationCompilerPlugInEnumMethod> getPlugInEnumMethods()
      Returns the list of plug-in enum-methods
      Returns:
      plug-in enum methods
    • reset

      protected void reset()
      Reset to an empty configuration.