|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.core.EngineImportServiceImpl
public class EngineImportServiceImpl
Implementation for engine-level imports.
Field Summary |
---|
Fields inherited from interface com.espertech.esper.epl.core.EngineImportService |
---|
EXT_SINGLEROW_FUNCTION_TRANSPOSE |
Constructor Summary | |
---|---|
EngineImportServiceImpl(boolean allowExtendedAggregationFunc,
boolean isUdfCache,
boolean isDuckType,
boolean sortUsingCollator,
java.math.MathContext optionalDefaultMathContext,
java.util.TimeZone timeZone,
ConfigurationEngineDefaults.ThreadingProfile threadingProfile)
Ctor |
Method Summary | |
---|---|
void |
addAggregation(java.lang.String functionName,
ConfigurationPlugInAggregationFunction aggregationDesc)
Add an aggregation function. |
void |
addAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction desc)
|
void |
addAnnotationImport(java.lang.String importName)
Add an import for annotation-only use, such as "com.mypackage.*" or "com.mypackage.MyClass". |
void |
addImport(java.lang.String importName)
Add an import, such as "com.mypackage.*" or "com.mypackage.MyClass". |
void |
addMethodRefs(java.util.Map<java.lang.String,ConfigurationMethodRef> configs)
Adds cache configs for method invocations for from-clause. |
void |
addSingleRow(java.lang.String functionName,
java.lang.String singleRowFuncClass,
java.lang.String methodName,
ConfigurationPlugInSingleRowFunction.ValueCache valueCache,
ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable,
boolean rethrowExceptions)
Add an single-row function. |
ConfigurationMethodRef |
getConfigurationMethodRef(java.lang.String className)
Returns the method invocation caches for the from-clause for a class. |
java.math.MathContext |
getDefaultMathContext()
|
protected java.lang.String[] |
getImports()
For testing, returns imports. |
ConfigurationEngineDefaults.ThreadingProfile |
getThreadingProfile()
|
java.util.TimeZone |
getTimeZone()
|
boolean |
isDuckType()
|
boolean |
isSortUsingCollator()
|
boolean |
isUdfCache()
|
ExprNode |
resolveAggExtendedBuiltin(java.lang.String name,
boolean isDistinct)
Resolve an extended (non-SQL std) builtin aggregation. |
AggregationFunctionFactory |
resolveAggregationFactory(java.lang.String name)
Used at statement compile-time to try and resolve a given function name into an aggregation method. |
ConfigurationPlugInAggregationMultiFunction |
resolveAggregationMultiFunction(java.lang.String name)
|
java.lang.Class |
resolveAnnotation(java.lang.String className)
Resolves a given class name, either fully qualified and simple and imported to a annotation. |
java.lang.Class |
resolveClass(java.lang.String className,
boolean forAnnotation)
Resolves a given class name, either fully qualified and simple and imported to a class. |
protected java.lang.Class |
resolveClassInternal(java.lang.String className,
boolean requireAnnotation,
boolean forAnnotationUse)
Finds a class by class name using the auto-import information provided. |
java.lang.reflect.Constructor |
resolveCtor(java.lang.Class clazz,
java.lang.Class[] paramTypes)
Resolves a constructor matching list of parameter types. |
java.lang.reflect.Method |
resolveMethod(java.lang.Class clazz,
java.lang.String methodName,
java.lang.Class[] paramTypes,
boolean[] allowEventBeanType,
boolean[] allowEventBeanCollType)
Resolves a given method name and list of parameter types to an instance or static method exposed by the given class. |
java.lang.reflect.Method |
resolveMethod(java.lang.String className,
java.lang.String methodName)
Resolves a given class and method name to a static method, expecting the method to exist exactly once and not be overloaded, with any parameters. |
java.lang.reflect.Method |
resolveMethod(java.lang.String className,
java.lang.String methodName,
java.lang.Class[] paramTypes,
boolean[] allowEventBeanType,
boolean[] allowEventBeanCollType)
Resolves a given class, method and list of parameter types to a static method. |
java.lang.reflect.Method |
resolveNonStaticMethod(java.lang.Class clazz,
java.lang.String methodName)
Resolves a given class and method name to a non-static method, expecting the method to exist exactly once and not be overloaded, with any parameters. |
Pair<java.lang.Class,EngineImportSingleRowDesc> |
resolveSingleRow(java.lang.String name)
Used at statement compile-time to try and resolve a given function name into an single-row function. |
ExprNode |
resolveSingleRowExtendedBuiltin(java.lang.String name)
Resolve an extended (non-SQL std) single-row function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EngineImportServiceImpl(boolean allowExtendedAggregationFunc, boolean isUdfCache, boolean isDuckType, boolean sortUsingCollator, java.math.MathContext optionalDefaultMathContext, java.util.TimeZone timeZone, ConfigurationEngineDefaults.ThreadingProfile threadingProfile)
allowExtendedAggregationFunc
- true to allow non-SQL standard builtin agg functions.Method Detail |
---|
public boolean isUdfCache()
isUdfCache
in interface EngineImportService
public boolean isDuckType()
isDuckType
in interface EngineImportService
public ConfigurationMethodRef getConfigurationMethodRef(java.lang.String className)
EngineImportService
getConfigurationMethodRef
in interface EngineImportService
className
- the class name providing the method
public void addMethodRefs(java.util.Map<java.lang.String,ConfigurationMethodRef> configs)
configs
- cache configspublic void addImport(java.lang.String importName) throws EngineImportException
EngineImportService
addImport
in interface EngineImportService
importName
- is the import to add
EngineImportException
- if the information or format is invalidpublic void addAnnotationImport(java.lang.String importName) throws EngineImportException
EngineImportService
addAnnotationImport
in interface EngineImportService
importName
- is the import to add
EngineImportException
- if the information or format is invalidpublic void addAggregation(java.lang.String functionName, ConfigurationPlugInAggregationFunction aggregationDesc) throws EngineImportException
EngineImportService
addAggregation
in interface EngineImportService
functionName
- is the name of the function to make known.aggregationDesc
- is the descriptor for the aggregation function
EngineImportException
- throw if format or information is invalidpublic void addSingleRow(java.lang.String functionName, java.lang.String singleRowFuncClass, java.lang.String methodName, ConfigurationPlugInSingleRowFunction.ValueCache valueCache, ConfigurationPlugInSingleRowFunction.FilterOptimizable filterOptimizable, boolean rethrowExceptions) throws EngineImportException
EngineImportService
addSingleRow
in interface EngineImportService
functionName
- is the name of the function to make known.singleRowFuncClass
- is the class that provides the single row functionmethodName
- is the name of the public static method provided by the class that provides the single row functionvalueCache
- setting to control value cache behavior which may cache a result value when constant parameters are passed
EngineImportException
- throw if format or information is invalidpublic AggregationFunctionFactory resolveAggregationFactory(java.lang.String name) throws EngineImportUndefinedException, EngineImportException
EngineImportService
resolveAggregationFactory
in interface EngineImportService
name
- is the function name
EngineImportUndefinedException
- if the function is not a configured aggregation function
EngineImportException
- if the aggregation providing class could not be loaded or doesn't matchpublic void addAggregationMultiFunction(ConfigurationPlugInAggregationMultiFunction desc) throws EngineImportException
addAggregationMultiFunction
in interface EngineImportService
EngineImportException
public ConfigurationPlugInAggregationMultiFunction resolveAggregationMultiFunction(java.lang.String name)
resolveAggregationMultiFunction
in interface EngineImportService
public Pair<java.lang.Class,EngineImportSingleRowDesc> resolveSingleRow(java.lang.String name) throws EngineImportException, EngineImportUndefinedException
EngineImportService
resolveSingleRow
in interface EngineImportService
name
- is the function name
EngineImportException
- if the function providing class could not be loaded or doesn't match
EngineImportUndefinedException
- if the function is not a configured single-row functionpublic java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName, java.lang.Class[] paramTypes, boolean[] allowEventBeanType, boolean[] allowEventBeanCollType) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
className
- is the class name to usemethodName
- is the method nameparamTypes
- is parameter types match expression sub-nodes
EngineImportException
- if the method cannot be resolved to a visible static methodpublic java.lang.reflect.Constructor resolveCtor(java.lang.Class clazz, java.lang.Class[] paramTypes) throws EngineImportException
EngineImportService
resolveCtor
in interface EngineImportService
clazz
- is the class to useparamTypes
- is parameter types match expression sub-nodes
EngineImportException
- if the ctor cannot be resolvedpublic java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
className
- is the class name to usemethodName
- is the method name
EngineImportException
- if the method cannot be resolved to a visible static method, or
if the method is overloadedpublic java.lang.reflect.Method resolveNonStaticMethod(java.lang.Class clazz, java.lang.String methodName) throws EngineImportException
EngineImportService
resolveNonStaticMethod
in interface EngineImportService
clazz
- is the classmethodName
- is the method name
EngineImportException
- if the method cannot be resolved to a visible static method, or
if the method is overloadedpublic java.lang.Class resolveClass(java.lang.String className, boolean forAnnotation) throws EngineImportException
EngineImportService
resolveClass
in interface EngineImportService
className
- is the class name to use
EngineImportException
- if there was an error resolving the classpublic java.lang.Class resolveAnnotation(java.lang.String className) throws EngineImportException
EngineImportService
resolveAnnotation
in interface EngineImportService
className
- is the class name to use
EngineImportException
- if there was an error resolving the classprotected java.lang.Class resolveClassInternal(java.lang.String className, boolean requireAnnotation, boolean forAnnotationUse) throws java.lang.ClassNotFoundException
className
- is the class name to find
java.lang.ClassNotFoundException
- if the class cannot be loadedpublic java.lang.reflect.Method resolveMethod(java.lang.Class clazz, java.lang.String methodName, java.lang.Class[] paramTypes, boolean[] allowEventBeanType, boolean[] allowEventBeanCollType) throws EngineImportException
EngineImportService
resolveMethod
in interface EngineImportService
clazz
- is the class to look for a fitting methodmethodName
- is the method nameparamTypes
- is parameter types match expression sub-nodesallowEventBeanType
- whether EventBean footprint is allowed
EngineImportException
- if the method cannot be resolved to a visible static or instance methodpublic ExprNode resolveSingleRowExtendedBuiltin(java.lang.String name)
EngineImportService
resolveSingleRowExtendedBuiltin
in interface EngineImportService
name
- of func
public ExprNode resolveAggExtendedBuiltin(java.lang.String name, boolean isDistinct)
EngineImportService
resolveAggExtendedBuiltin
in interface EngineImportService
name
- of funcisDistinct
- indicator
public java.math.MathContext getDefaultMathContext()
getDefaultMathContext
in interface EngineImportService
public java.util.TimeZone getTimeZone()
getTimeZone
in interface EngineImportService
public ConfigurationEngineDefaults.ThreadingProfile getThreadingProfile()
getThreadingProfile
in interface EngineImportService
public boolean isSortUsingCollator()
isSortUsingCollator
in interface EngineImportService
protected java.lang.String[] getImports()
|
© 2006-2016 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |