Package com.espertech.esper.epl.spec

Examples of com.espertech.esper.epl.spec.StreamSpecCompiled


        this.statementContext = statementContext;

        EPPreparedExecuteMethodHelper.validateFAFQuery(statementSpec);

        // resolve named window processor
        final StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs()[0];
        NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;

        String aliasName = namedSpec.getWindowName();
        if (namedSpec.getOptionalStreamName() != null) {
            aliasName = namedSpec.getOptionalStreamName();
View Full Code Here


            List<ExprNode>[] namedWindowFilters = new List[statementSpec.getStreamSpecs().length];

            for (int i = 0; i < statementSpec.getStreamSpecs().length; i++)
            {
                final int streamNum = i;
                StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs()[i];

                if (streamSpec instanceof NamedWindowConsumerStreamSpec)
                {
                    hasNamedWindow = true;
                    final NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;
View Full Code Here

        agentInstanceContext = new AgentInstanceContext(statementContext, null, -1, null, null, statementContext.getDefaultAgentInstanceScriptContext());

        // resolve types and named window processors
        for (int i = 0; i < numStreams; i++)
        {
            final StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs()[i];
            NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;

            String streamName = namedSpec.getWindowName();
            if (namedSpec.getOptionalStreamName() != null)
            {
View Full Code Here

        }
        return new EPPreparedQueryResult(resultSetProcessor.getResultEventType(), EventBeanUtility.flatten(events));
    }

    private Collection<EventBean> getStreamFilterSnapshot(int streamNum, ContextPartitionSelector contextPartitionSelector) {
        final StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs()[streamNum];
        NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;
        NamedWindowProcessor namedWindowProcessor = processors[streamNum];

        // handle the case of a single or matching agent instance
        NamedWindowProcessorInstance processorInstance = namedWindowProcessor.getProcessorInstance(agentInstanceContext);
View Full Code Here

            List<ExprNode>[] namedWindowFilters = new List[statementSpec.getStreamSpecs().length];

            for (int i = 0; i < statementSpec.getStreamSpecs().length; i++)
            {
                final int streamNum = i;
                StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs()[i];

                if (streamSpec instanceof NamedWindowConsumerStreamSpec)
                {
                    hasNamedWindow = true;
                    final NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;
View Full Code Here

        StreamJoinAnalysisResult streamJoinAnalysisResult = new StreamJoinAnalysisResult(numStreams);
        Arrays.fill(streamJoinAnalysisResult.getNamedWindow(), true);

        for (int i = 0; i < numStreams; i++)
        {
            final StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs().get(i);
            NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;

            String streamName = namedSpec.getWindowName();
            if (namedSpec.getOptionalStreamName() != null)
            {
View Full Code Here

        int numStreams = processors.length;

        Collection<EventBean>[] snapshots = new Collection[numStreams];
        for (int i = 0; i < numStreams; i++)
        {
            final StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs().get(i);
            NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;
            snapshots[i] = processors[i].getTailView().snapshot(filters[i]);

            if (namedSpec.getFilterExpressions().size() != 0)
            {
View Full Code Here

        Arrays.fill(streamJoinAnalysisResult.getNamedWindow(), true);
        agentInstanceContext = new AgentInstanceContext(statementContext, null, null, null, null);

        for (int i = 0; i < numStreams; i++)
        {
            final StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs().get(i);
            NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;

            String streamName = namedSpec.getWindowName();
            if (namedSpec.getOptionalStreamName() != null)
            {
View Full Code Here

        int numStreams = processors.length;

        Collection<EventBean>[] snapshots = new Collection[numStreams];
        for (int i = 0; i < numStreams; i++)
        {
            final StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs().get(i);
            NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;
            NamedWindowProcessorInstance processorInstance = processors[i].getProcessorInstance(agentInstanceContext);
            if (processorInstance == null) {
                throw new EPException("Named window '" + namedSpec.getWindowName() + "' is associated to context '" + processors[i].getContextName() + "' that is not available for querying");
            }
View Full Code Here

            // Replay any named window data, for later consumers of named data windows
            boolean hasNamedWindow = false;
            for (int i = 0; i < statementSpec.getStreamSpecs().size(); i++)
            {
                StreamSpecCompiled streamSpec = statementSpec.getStreamSpecs().get(i);
                if (streamSpec instanceof NamedWindowConsumerStreamSpec)
                {
                    hasNamedWindow = true;
                    NamedWindowConsumerStreamSpec namedSpec = (NamedWindowConsumerStreamSpec) streamSpec;
                    NamedWindowProcessor processor = services.getNamedWindowService().getProcessor(namedSpec.getWindowName());
View Full Code Here

TOP

Related Classes of com.espertech.esper.epl.spec.StreamSpecCompiled

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.