Class StreamFunctionProcessor<S extends State>

    • Constructor Detail

      • StreamFunctionProcessor

        public StreamFunctionProcessor()
    • Method Detail

      • processEventChunk

        protected void processEventChunk​(ComplexEventChunk<StreamEvent> streamEventChunk,
                                         Processor nextProcessor,
                                         StreamEventCloner streamEventCloner,
                                         ComplexEventPopulater complexEventPopulater,
                                         S state)
        Description copied from class: AbstractStreamProcessor
        The main processing method that will be called upon event arrival
        Specified by:
        processEventChunk in class AbstractStreamProcessor<S extends State>
        Parameters:
        streamEventChunk - the event chunk that need to be processed
        nextProcessor - the next processor to which the success events need to be passed
        streamEventCloner - helps to clone the incoming event for local storage or modification
        complexEventPopulater - helps to populate the events with the resultant attributes
        state - current state of the processor
      • process

        protected abstract Object[] process​(Object[] data)
        The process method of the StreamFunction, used when more then one function parameters are provided
        Parameters:
        data - the data values for the function parameters
        Returns:
        the data for additional output attributes introduced by the function
      • process

        protected abstract Object[] process​(Object data)
        The process method of the StreamFunction, used when zero or one function parameter is provided
        Parameters:
        data - null if the function parameter count is zero or runtime data value of the function parameter
        Returns:
        the data for additional output attribute introduced by the function
      • init

        protected StateFactory<S> init​(MetaStreamEvent metaStreamEvent,
                                       io.siddhi.query.api.definition.AbstractDefinition inputDefinition,
                                       ExpressionExecutor[] attributeExpressionExecutors,
                                       ConfigReader configReader,
                                       StreamEventClonerHolder streamEventClonerHolder,
                                       boolean outputExpectsExpiredEvents,
                                       boolean findToBeExecuted,
                                       SiddhiQueryContext siddhiQueryContext)
        The init method of the StreamProcessor, this method will be called before other methods
        Specified by:
        init in class AbstractStreamProcessor<S extends State>
        Parameters:
        metaStreamEvent - the stream event meta
        inputDefinition - the incoming stream definition
        attributeExpressionExecutors - the executors of each function parameters
        configReader - this hold the StreamFunctionProcessor extensions configuration
        streamEventClonerHolder - stream event cloner Holder
        outputExpectsExpiredEvents - is expired events sent as output
        findToBeExecuted - find operation will be performed
        siddhiQueryContext - siddhi query context
      • init

        protected abstract StateFactory<S> init​(io.siddhi.query.api.definition.AbstractDefinition inputDefinition,
                                                ExpressionExecutor[] attributeExpressionExecutors,
                                                ConfigReader configReader,
                                                boolean outputExpectsExpiredEvents,
                                                SiddhiQueryContext siddhiQueryContext)
        The init method of the StreamProcessor, this method will be called before other methods
        Parameters:
        inputDefinition - the incoming stream definition
        attributeExpressionExecutors - the executors of each function parameters
        configReader - this hold the StreamFunctionProcessor extensions configuration reader.
        outputExpectsExpiredEvents - is expired events sent as output
        siddhiQueryContext - the context of the siddhi query
        Returns:
        the additional output attributes introduced by the function