|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.core.MethodResolutionServiceImpl
public class MethodResolutionServiceImpl
Implements method resolution.
Constructor Summary | |
---|---|
MethodResolutionServiceImpl(EngineImportService engineImportService,
TimeProvider timeProvider)
Ctor. |
Method Summary | |
---|---|
void |
destroyedAgentInstance(int agentInstanceId)
|
java.lang.Class |
getAvgAggregatorType(java.lang.Class type)
|
java.lang.Object |
getCriteriaKeyBinding(ExprEvaluator[] evaluators)
|
long |
getCurrentRowCount(AggregationMethod[] aggregators,
AggregationState[] groupStates)
Returns the current row count of an aggregation, for use with resilience. |
EngineImportService |
getEngineImportService()
|
java.lang.Object |
getGroupKeyBinding(AggregationLocalGroupByPlan localGroupByPlan)
|
java.lang.Object |
getGroupKeyBinding(ExprNode[] groupKeyExpressions,
AggregationGroupByRollupDesc groupByRollupDesc)
|
java.lang.Class |
getSumAggregatorType(java.lang.Class type)
|
boolean |
isDuckType()
|
boolean |
isSortUsingCollator()
|
boolean |
isUdfCache()
Returns true to cache UDF results for constant parameter sets. |
AggregationState |
makeAccessAggLinearJoin(int agentInstanceId,
int groupId,
int aggregationId,
int streamNum)
|
AggregationState |
makeAccessAggLinearNonJoin(int agentInstanceId,
int groupId,
int aggregationId,
int streamNum)
|
AggregationState |
makeAccessAggMinMaxEver(int agentInstanceId,
int groupId,
int aggregationId,
AggregationStateMinMaxByEverSpec spec)
|
AggregationState |
makeAccessAggPlugin(int agentInstanceId,
int groupId,
int aggregationId,
boolean join,
PlugInAggregationMultiFunctionStateFactory providerFactory,
java.lang.Object groupKey)
|
AggregationState |
makeAccessAggSortedJoin(int agentInstanceId,
int groupId,
int aggregationId,
AggregationStateSortedSpec spec)
|
AggregationState |
makeAccessAggSortedNonJoin(int agentInstanceId,
int groupId,
int aggregationId,
AggregationStateSortedSpec spec)
|
AggregationMethod |
makeAvedevAggregator(int agentInstanceId,
int groupId,
int aggregationId,
boolean hasFilter)
Makes a new avedev-aggregator. |
AggregationMethod |
makeAvgAggregator(int agentInstanceId,
int groupId,
int aggregationId,
java.lang.Class type,
boolean hasFilter)
Makes a new avg-aggregator. |
AggregationMethod |
makeCountAggregator(int agentInstanceId,
int groupId,
int aggregationId,
boolean isIgnoreNull,
boolean hasFilter)
Makes a new count-aggregator. |
AggregationMethod |
makeCountEverValueAggregator(int agentInstanceId,
int groupId,
int aggregationId,
boolean hasFilter,
boolean ignoreNulls)
Makes a new countever-value aggregator. |
AggregationState |
makeCountMinSketch(int agentInstanceId,
int groupId,
int aggregationId,
CountMinSketchSpec specification)
|
AggregationMethod |
makeDistinctAggregator(int agentInstanceId,
int groupId,
int aggregationId,
AggregationMethod aggregationMethod,
java.lang.Class childType,
boolean hasFilter)
Makes a new distinct-value-aggregator. |
AggregationMethod |
makeFirstEverValueAggregator(int agentInstanceId,
int groupId,
int aggregationId,
java.lang.Class type,
boolean hasFilter)
Makes a new first-value aggregator. |
AggregationMethod |
makeLastEverValueAggregator(int agentInstanceId,
int groupId,
int aggregationId,
java.lang.Class type,
boolean hasFilter)
Makes a new last-value aggregator. |
AggregationMethod |
makeLeavingAggregator(int agentInstanceId,
int groupId,
int aggregationId)
Make leaving agg. |
AggregationMethod |
makeMedianAggregator(int agentInstanceId,
int groupId,
int aggregationId,
boolean hasFilter)
Makes a new median-aggregator. |
AggregationMethod |
makeMinMaxAggregator(int agentInstanceId,
int groupId,
int aggregationId,
MinMaxTypeEnum minMaxTypeEnum,
java.lang.Class targetType,
boolean isHasDataWindows,
boolean hasFilter)
Makes a new min-max-aggregator. |
AggregationMethod |
makeNthAggregator(int agentInstanceId,
int groupId,
int aggregationId,
java.lang.Class returnType,
int size)
Makes a Nth element aggregator. |
AggregationMethod |
makeRateAggregator(int agentInstanceId,
int groupId,
int aggregationId)
Makes a new rate-aggregator. |
AggregationMethod |
makeRateEverAggregator(int agentInstanceId,
int groupId,
int aggregationId,
long interval)
Makes a new rate-aggregator. |
AggregationMethod |
makeStddevAggregator(int agentInstanceId,
int groupId,
int aggregationId,
boolean hasFilter)
Makes a new stddev-aggregator. |
AggregationMethod |
makeSumAggregator(int agentInstanceId,
int groupId,
int aggregationId,
java.lang.Class type,
boolean hasFilter)
Makes a new sum-aggregator. |
AggregationState[] |
newAccesses(int agentInstanceId,
boolean isJoin,
AggregationStateFactory[] accessAggSpecs)
|
AggregationState[] |
newAccesses(int agentInstanceId,
boolean isJoin,
AggregationStateFactory[] accessAggSpecs,
java.lang.Object groupKey,
java.lang.Object groupKeyBinding,
AggregationGroupByRollupLevel groupByRollupLevel)
|
AggregationMethod[] |
newAggregators(AggregationMethodFactory[] prototypes,
int agentInstanceId)
Returns a new set of aggregators given an existing prototype-set of aggregators for a given context partition (no groups). |
AggregationMethod[] |
newAggregators(AggregationMethodFactory[] prototypes,
int agentInstanceId,
java.lang.Object groupKey,
java.lang.Object groupKeyBinding,
AggregationGroupByRollupLevel groupByRollupLevel)
Returns a new set of aggregators given an existing prototype-set of aggregators for a given context partition and group key. |
AggregationMethod[] |
newAggregatorsInternal(AggregationMethodFactory[] prototypes,
int agentInstanceId)
|
void |
removeAggregators(int agentInstanceId,
java.lang.Object groupKey,
java.lang.Object groupKeyBinding,
AggregationGroupByRollupLevel level)
Opportunity to remove aggregations for a group. |
AggregationFunctionFactory |
resolveAggregationFactory(java.lang.String functionName)
Returns a plug-in aggregation function factory for a given configured aggregation function name. |
java.lang.Class |
resolveClass(java.lang.String className)
Resolves a given class name, either fully qualified and simple and imported to a class. |
java.lang.reflect.Constructor |
resolveCtor(java.lang.Class clazz,
java.lang.Class[] paramTypes)
Resolves matching available constructors to a list of parameter types to an instance or static method exposed by the given class. |
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, not allowing overloaded methods and expecting the method to be found exactly once with zero or more 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, not allowing overloaded methods and expecting the method to be found exactly once with zero or more parameters. |
Pair<java.lang.Class,EngineImportSingleRowDesc> |
resolveSingleRow(java.lang.String functionName)
Used at statement compile-time to try and resolve a given function name into an single-row function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MethodResolutionServiceImpl(EngineImportService engineImportService, TimeProvider timeProvider)
engineImportService
- is the engine importstimeProvider
- returns timeMethod Detail |
---|
public boolean isUdfCache()
MethodResolutionService
isUdfCache
in interface MethodResolutionService
public boolean isDuckType()
isDuckType
in interface MethodResolutionService
public boolean isSortUsingCollator()
isSortUsingCollator
in interface MethodResolutionService
public java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName, java.lang.Class[] paramTypes, boolean[] allowEventBeanType, boolean[] allowEventBeanCollType) throws EngineImportException
MethodResolutionService
resolveMethod
in interface MethodResolutionService
className
- is the class name to usemethodName
- is the method nameparamTypes
- is parameter types match expression sub-nodesallowEventBeanType
- allow event bean type footprint
EngineImportException
- if the method cannot be resolved to a visible static methodpublic java.lang.reflect.Method resolveMethod(java.lang.String className, java.lang.String methodName) throws EngineImportException
MethodResolutionService
resolveMethod
in interface MethodResolutionService
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 exists more
then once with different parameterspublic java.lang.reflect.Method resolveNonStaticMethod(java.lang.Class clazz, java.lang.String methodName) throws EngineImportException
MethodResolutionService
resolveNonStaticMethod
in interface MethodResolutionService
clazz
- is the clazz to usemethodName
- is the method name
EngineImportException
- if the method cannot be resolved to a visible static method, or if the method exists more
then once with different parameterspublic java.lang.reflect.Constructor resolveCtor(java.lang.Class clazz, java.lang.Class[] paramTypes) throws EngineImportException
MethodResolutionService
resolveCtor
in interface MethodResolutionService
clazz
- is the class to look for a fitting methodparamTypes
- is parameter types match expression sub-nodes
EngineImportException
- if the method cannot be resolved to a visible static or instance methodpublic java.lang.Class resolveClass(java.lang.String className) throws EngineImportException
MethodResolutionService
resolveClass
in interface MethodResolutionService
className
- is the class name to use
EngineImportException
- if there was an error resolving the classpublic java.lang.reflect.Method resolveMethod(java.lang.Class clazz, java.lang.String methodName, java.lang.Class[] paramTypes, boolean[] allowEventBeanType, boolean[] allowEventBeanCollType) throws EngineImportException
MethodResolutionService
resolveMethod
in interface MethodResolutionService
clazz
- is the class to look for a fitting methodmethodName
- is the method nameparamTypes
- is parameter types match expression sub-nodes
EngineImportException
- if the method cannot be resolved to a visible static or instance methodpublic AggregationMethod makeCountAggregator(int agentInstanceId, int groupId, int aggregationId, boolean isIgnoreNull, boolean hasFilter)
MethodResolutionService
makeCountAggregator
in interface MethodResolutionService
isIgnoreNull
- is true to ignore nulls, or false to count nulls @return aggregatorpublic AggregationFunctionFactory resolveAggregationFactory(java.lang.String functionName) throws EngineImportUndefinedException, EngineImportException
MethodResolutionService
resolveAggregationFactory
in interface MethodResolutionService
functionName
- is the aggregation function name
EngineImportUndefinedException
- is the function name cannot be found
EngineImportException
- if there was an error resolving class informationpublic Pair<java.lang.Class,EngineImportSingleRowDesc> resolveSingleRow(java.lang.String functionName) throws EngineImportUndefinedException, EngineImportException
MethodResolutionService
resolveSingleRow
in interface MethodResolutionService
functionName
- is the function name
EngineImportUndefinedException
- if the function is not a configured single-row function
EngineImportException
- if the function providing class could not be loaded or doesn't matchpublic AggregationMethod makeSumAggregator(int agentInstanceId, int groupId, int aggregationId, java.lang.Class type, boolean hasFilter)
MethodResolutionService
makeSumAggregator
in interface MethodResolutionService
type
- is the type to be summed up, i.e. float, long etc. @return aggregatorpublic java.lang.Class getSumAggregatorType(java.lang.Class type)
getSumAggregatorType
in interface MethodResolutionService
public AggregationMethod makeDistinctAggregator(int agentInstanceId, int groupId, int aggregationId, AggregationMethod aggregationMethod, java.lang.Class childType, boolean hasFilter)
MethodResolutionService
makeDistinctAggregator
in interface MethodResolutionService
aggregationMethod
- is the inner aggregation methodchildType
- is the return type of the inner expression to aggregate, if any @return aggregatorpublic AggregationMethod makeAvgAggregator(int agentInstanceId, int groupId, int aggregationId, java.lang.Class type, boolean hasFilter)
MethodResolutionService
makeAvgAggregator
in interface MethodResolutionService
type
- the expression return type @return aggregatorpublic java.lang.Class getAvgAggregatorType(java.lang.Class type)
getAvgAggregatorType
in interface MethodResolutionService
public AggregationMethod makeAvedevAggregator(int agentInstanceId, int groupId, int aggregationId, boolean hasFilter)
MethodResolutionService
makeAvedevAggregator
in interface MethodResolutionService
public AggregationMethod makeMedianAggregator(int agentInstanceId, int groupId, int aggregationId, boolean hasFilter)
MethodResolutionService
makeMedianAggregator
in interface MethodResolutionService
public AggregationMethod makeMinMaxAggregator(int agentInstanceId, int groupId, int aggregationId, MinMaxTypeEnum minMaxTypeEnum, java.lang.Class targetType, boolean isHasDataWindows, boolean hasFilter)
MethodResolutionService
makeMinMaxAggregator
in interface MethodResolutionService
minMaxTypeEnum
- dedicates whether to do min or maxtargetType
- is the type to max or minisHasDataWindows
- true for has data windows @return aggregator to usepublic AggregationMethod makeStddevAggregator(int agentInstanceId, int groupId, int aggregationId, boolean hasFilter)
MethodResolutionService
makeStddevAggregator
in interface MethodResolutionService
public AggregationMethod makeFirstEverValueAggregator(int agentInstanceId, int groupId, int aggregationId, java.lang.Class type, boolean hasFilter)
MethodResolutionService
makeFirstEverValueAggregator
in interface MethodResolutionService
type
- of value @return aggregatorpublic AggregationMethod makeCountEverValueAggregator(int agentInstanceId, int groupId, int aggregationId, boolean hasFilter, boolean ignoreNulls)
MethodResolutionService
makeCountEverValueAggregator
in interface MethodResolutionService
public AggregationMethod makeLastEverValueAggregator(int agentInstanceId, int groupId, int aggregationId, java.lang.Class type, boolean hasFilter)
MethodResolutionService
makeLastEverValueAggregator
in interface MethodResolutionService
type
- of value @return aggregatorpublic AggregationMethod makeRateAggregator(int agentInstanceId, int groupId, int aggregationId)
MethodResolutionService
makeRateAggregator
in interface MethodResolutionService
public AggregationMethod makeRateEverAggregator(int agentInstanceId, int groupId, int aggregationId, long interval)
MethodResolutionService
makeRateEverAggregator
in interface MethodResolutionService
interval
- seconds
public AggregationMethod makeNthAggregator(int agentInstanceId, int groupId, int aggregationId, java.lang.Class returnType, int size)
MethodResolutionService
makeNthAggregator
in interface MethodResolutionService
returnType
- of aggregationsize
- of elements @return aggregatorpublic AggregationMethod makeLeavingAggregator(int agentInstanceId, int groupId, int aggregationId)
MethodResolutionService
makeLeavingAggregator
in interface MethodResolutionService
public AggregationMethod[] newAggregators(AggregationMethodFactory[] prototypes, int agentInstanceId)
MethodResolutionService
newAggregators
in interface MethodResolutionService
agentInstanceId
- context partition
public AggregationMethod[] newAggregators(AggregationMethodFactory[] prototypes, int agentInstanceId, java.lang.Object groupKey, java.lang.Object groupKeyBinding, AggregationGroupByRollupLevel groupByRollupLevel)
MethodResolutionService
newAggregators
in interface MethodResolutionService
prototypes
- is the prototypesagentInstanceId
- context partitiongroupKey
- is the key to group-by for
public AggregationMethod[] newAggregatorsInternal(AggregationMethodFactory[] prototypes, int agentInstanceId)
public long getCurrentRowCount(AggregationMethod[] aggregators, AggregationState[] groupStates)
MethodResolutionService
getCurrentRowCount
in interface MethodResolutionService
aggregators
- aggregators
public void removeAggregators(int agentInstanceId, java.lang.Object groupKey, java.lang.Object groupKeyBinding, AggregationGroupByRollupLevel level)
MethodResolutionService
removeAggregators
in interface MethodResolutionService
groupKey
- that is no longer usedpublic AggregationState[] newAccesses(int agentInstanceId, boolean isJoin, AggregationStateFactory[] accessAggSpecs)
newAccesses
in interface MethodResolutionService
public AggregationState[] newAccesses(int agentInstanceId, boolean isJoin, AggregationStateFactory[] accessAggSpecs, java.lang.Object groupKey, java.lang.Object groupKeyBinding, AggregationGroupByRollupLevel groupByRollupLevel)
newAccesses
in interface MethodResolutionService
public AggregationState makeAccessAggLinearNonJoin(int agentInstanceId, int groupId, int aggregationId, int streamNum)
makeAccessAggLinearNonJoin
in interface MethodResolutionService
public AggregationState makeAccessAggLinearJoin(int agentInstanceId, int groupId, int aggregationId, int streamNum)
makeAccessAggLinearJoin
in interface MethodResolutionService
public AggregationState makeAccessAggSortedNonJoin(int agentInstanceId, int groupId, int aggregationId, AggregationStateSortedSpec spec)
makeAccessAggSortedNonJoin
in interface MethodResolutionService
public AggregationState makeAccessAggSortedJoin(int agentInstanceId, int groupId, int aggregationId, AggregationStateSortedSpec spec)
makeAccessAggSortedJoin
in interface MethodResolutionService
public AggregationState makeAccessAggMinMaxEver(int agentInstanceId, int groupId, int aggregationId, AggregationStateMinMaxByEverSpec spec)
makeAccessAggMinMaxEver
in interface MethodResolutionService
public AggregationState makeAccessAggPlugin(int agentInstanceId, int groupId, int aggregationId, boolean join, PlugInAggregationMultiFunctionStateFactory providerFactory, java.lang.Object groupKey)
makeAccessAggPlugin
in interface MethodResolutionService
public AggregationState makeCountMinSketch(int agentInstanceId, int groupId, int aggregationId, CountMinSketchSpec specification)
makeCountMinSketch
in interface MethodResolutionService
public void destroyedAgentInstance(int agentInstanceId)
destroyedAgentInstance
in interface MethodResolutionService
public EngineImportService getEngineImportService()
getEngineImportService
in interface MethodResolutionService
public java.lang.Object getCriteriaKeyBinding(ExprEvaluator[] evaluators)
getCriteriaKeyBinding
in interface MethodResolutionService
public java.lang.Object getGroupKeyBinding(ExprNode[] groupKeyExpressions, AggregationGroupByRollupDesc groupByRollupDesc)
getGroupKeyBinding
in interface MethodResolutionService
public java.lang.Object getGroupKeyBinding(AggregationLocalGroupByPlan localGroupByPlan)
getGroupKeyBinding
in interface MethodResolutionService
|
© 2006-2015 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 |