Package io.siddhi.core.executor.function
Class FunctionExecutor<S extends State>
- java.lang.Object
-
- io.siddhi.core.executor.function.FunctionExecutor<S>
-
- Type Parameters:
S- current state for the Function Executor
- All Implemented Interfaces:
ExpressionExecutor,Serializable
- Direct Known Subclasses:
CastFunctionExecutor,CoalesceFunctionExecutor,ConvertFunctionExecutor,CreateSetFunctionExecutor,CurrentTimeMillisFunctionExecutor,DefaultFunctionExecutor,EventTimestampFunctionExecutor,EventVariableFunctionExecutor,IfThenElseFunctionExecutor,IncrementalAggregateBaseTimeFunctionExecutor,IncrementalShouldUpdateFunctionExecutor,IncrementalStartTimeEndTimeFunctionExecutor,IncrementalTimeGetTimeZone,IncrementalUnixTimeFunctionExecutor,InstanceOfBooleanFunctionExecutor,InstanceOfDoubleFunctionExecutor,InstanceOfFloatFunctionExecutor,InstanceOfIntegerFunctionExecutor,InstanceOfLongFunctionExecutor,InstanceOfStringFunctionExecutor,MaximumFunctionExecutor,MinimumFunctionExecutor,MultiValueVariableFunctionExecutor,ScriptFunctionExecutor,SizeOfSetFunctionExecutor,UUIDFunctionExecutor
public abstract class FunctionExecutor<S extends State> extends Object implements ExpressionExecutor
Parent abstract class for Function Executors. Function executor will have one or more input parameters and single return value.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ExpressionExecutor[]attributeExpressionExecutorsprotected StringfunctionIdprotected ProcessingModeprocessingModeprotected SiddhiQueryContextsiddhiQueryContext
-
Constructor Summary
Constructors Constructor Description FunctionExecutor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Objectexecute(ComplexEvent event)The main execution method which will be called upon event arrivalprotected Objectexecute(Object data)The main execution method which will be called upon event arrival when there are zero or one function parameterprotected Objectexecute(Object[] data)The main execution method which will be called upon event arrival when there are more then one function parameterprotected abstract Objectexecute(Object[] data, S state)The main execution method which will be called upon event arrival when there are more then one function parameterprotected abstract Objectexecute(Object data, S state)The main execution method which will be called upon event arrival when there are zero or one function parameterprotected abstract StateFactory<S>init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, SiddhiQueryContext siddhiQueryContext)The initialization method for FunctionExecutor, this method will be called before the other methodsvoidinitExecutor(ExpressionExecutor[] attributeExpressionExecutors, ProcessingMode processingMode, ConfigReader configReader, boolean groupBy, SiddhiQueryContext siddhiQueryContext)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.siddhi.core.executor.ExpressionExecutor
getReturnType
-
-
-
-
Field Detail
-
attributeExpressionExecutors
protected ExpressionExecutor[] attributeExpressionExecutors
-
siddhiQueryContext
protected SiddhiQueryContext siddhiQueryContext
-
functionId
protected String functionId
-
processingMode
protected ProcessingMode processingMode
-
-
Method Detail
-
initExecutor
public void initExecutor(ExpressionExecutor[] attributeExpressionExecutors, ProcessingMode processingMode, ConfigReader configReader, boolean groupBy, SiddhiQueryContext siddhiQueryContext)
-
init
protected abstract StateFactory<S> init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, SiddhiQueryContext siddhiQueryContext)
The initialization method for FunctionExecutor, this method will be called before the other methods- Parameters:
attributeExpressionExecutors- are the executors of each function parametersconfigReader- This hold theFunctionExecutorextensions configuration reader.siddhiQueryContext- the context of the siddhi query
-
execute
public Object execute(ComplexEvent event)
The main execution method which will be called upon event arrival- Specified by:
executein interfaceExpressionExecutor- Parameters:
event- the event to be executed- Returns:
- the execution result
-
execute
protected Object execute(Object[] data)
The main execution method which will be called upon event arrival when there are more then one function parameter- Parameters:
data- the runtime values of function parameters- Returns:
- the function result
-
execute
protected Object execute(Object data)
The main execution method which will be called upon event arrival when there are zero or one function parameter- Parameters:
data- null if the function parameter count is zero or runtime data value of the function parameter- Returns:
- the function result
-
execute
protected abstract Object execute(Object[] data, S state)
The main execution method which will be called upon event arrival when there are more then one function parameter- Parameters:
data- the runtime values of function parametersstate- current query state- Returns:
- the function result
-
execute
protected abstract Object execute(Object data, S state)
The main execution method which will be called upon event arrival when there are zero or one function parameter- Parameters:
data- null if the function parameter count is zero or runtime data value of the function parameterstate- current query state- Returns:
- the function result
-
-