Package com.espertech.esper.epl.join.rep

Examples of com.espertech.esper.epl.join.rep.RepositoryImpl


        }
    }

    public void process(EventBean lookupEvent, EventBean[] prefillPath, List<EventBean[]> result, ExprEvaluatorContext exprEvaluatorContext)
    {
        RepositoryImpl repository = new RepositoryImpl(rootStream, lookupEvent, numStreams);
        boolean processOptional = true;

        for (int i = 0; i < requireResultsInstruction; i++)
        {
            LookupInstructionExec currentInstruction = lookupInstructions[i];
            boolean hasResults = currentInstruction.process(repository,exprEvaluatorContext);

            // no results, check what to do
            if (!hasResults)
            {
                // If there was a required stream, we are done.
                if (currentInstruction.hasRequiredStream())
                {
                    return;
                }

                // If this is the first stream and there are no results, we are done with lookups
                if (i == 0)
                {
                    processOptional = false// go to result processing
                }
            }
        }

        if (processOptional)
        {
            for (int i = requireResultsInstruction; i < lookupInstructions.length; i++)
            {
                LookupInstructionExec currentInstruction = lookupInstructions[i];
                currentInstruction.process(repository, exprEvaluatorContext);
            }
        }

        // provide a place for the result
        myResultAssembler.setResult(result, lookupEvent);

        // go over the assembly instruction set
        List<Node>[] results = repository.getNodesPerStream();

        // no results - need to execute the very last instruction/top node
        if (results == null)
        {
            BaseAssemblyNode lastAssemblyNode = assemblyInstructions[assemblyInstructions.length - 1];
View Full Code Here


        }
    }

    public void process(EventBean lookupEvent, EventBean[] prefillPath, Collection<EventBean[]> resultFinalRows, ExprEvaluatorContext exprEvaluatorContext)
    {
        RepositoryImpl repository = new RepositoryImpl(rootStream, lookupEvent, numStreams);
        boolean processOptional = true;

        for (int i = 0; i < requireResultsInstruction; i++)
        {
            LookupInstructionExec currentInstruction = lookupInstructions[i];
            boolean hasResults = currentInstruction.process(repository,exprEvaluatorContext);

            // no results, check what to do
            if (!hasResults)
            {
                // If there was a required stream, we are done.
                if (currentInstruction.hasRequiredStream())
                {
                    return;
                }

                // If this is the first stream and there are no results, we are done with lookups
                if (i == 0)
                {
                    processOptional = false// go to result processing
                }
            }
        }

        if (processOptional)
        {
            for (int i = requireResultsInstruction; i < lookupInstructions.length; i++)
            {
                LookupInstructionExec currentInstruction = lookupInstructions[i];
                currentInstruction.process(repository, exprEvaluatorContext);
            }
        }

        // go over the assembly instruction set
        List<Node>[] results = repository.getNodesPerStream();

        // no results - need to execute the very last instruction/top node
        if (results == null)
        {
            BaseAssemblyNode lastAssemblyNode = assemblyInstructions[assemblyInstructions.length - 1];
View Full Code Here

TOP

Related Classes of com.espertech.esper.epl.join.rep.RepositoryImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.