Search in sources :

Example 6 with StateInputStream

use of org.wso2.siddhi.query.api.execution.query.input.stream.StateInputStream in project siddhi by wso2.

the class SiddhiQLBaseVisitorImpl method visitSequence_stream.

/**
 * {@inheritDoc}
 * <p>The default implementation returns the result of calling
 * {@link #visitChildren} on {@code ctx}.</p>
 *
 * @param ctx
 */
@Override
public StateInputStream visitSequence_stream(@NotNull SiddhiQLParser.Sequence_streamContext ctx) {
    // ;
    if (ctx.every_sequence_source_chain() != null) {
        StateInputStream stateInputStream = (StateInputStream) visitEvery_sequence_source_chain(ctx.every_sequence_source_chain());
        populateQueryContext(stateInputStream, ctx);
        return stateInputStream;
    } else {
        StateInputStream stateInputStream = (StateInputStream) visitEvery_absent_sequence_source_chain(ctx.every_absent_sequence_source_chain());
        populateQueryContext(stateInputStream, ctx);
        return stateInputStream;
    }
}
Also used : StateInputStream(org.wso2.siddhi.query.api.execution.query.input.stream.StateInputStream)

Example 7 with StateInputStream

use of org.wso2.siddhi.query.api.execution.query.input.stream.StateInputStream in project siddhi by wso2.

the class SiddhiQLBaseVisitorImpl method visitPattern_stream.

/**
 * {@inheritDoc}
 * <p>The default implementation returns the result of calling
 * {@link #visitChildren} on {@code ctx}.</p>
 *
 * @param ctx
 */
@Override
public Object visitPattern_stream(@NotNull SiddhiQLParser.Pattern_streamContext ctx) {
    // pattern_stream
    // : every_pattern_source_chain
    // | every_absent_pattern_source_chain
    // ;
    StateElement stateElement;
    if (ctx.every_pattern_source_chain() != null) {
        stateElement = ((StateElement) visit(ctx.every_pattern_source_chain()));
    } else {
        stateElement = ((StateElement) visit(ctx.absent_pattern_source_chain()));
    }
    StateInputStream stateInputStream = new StateInputStream(StateInputStream.Type.PATTERN, stateElement);
    populateQueryContext(stateInputStream, ctx);
    return stateInputStream;
}
Also used : EveryStateElement(org.wso2.siddhi.query.api.execution.query.input.state.EveryStateElement) StreamStateElement(org.wso2.siddhi.query.api.execution.query.input.state.StreamStateElement) NextStateElement(org.wso2.siddhi.query.api.execution.query.input.state.NextStateElement) StateElement(org.wso2.siddhi.query.api.execution.query.input.state.StateElement) CountStateElement(org.wso2.siddhi.query.api.execution.query.input.state.CountStateElement) AbsentStreamStateElement(org.wso2.siddhi.query.api.execution.query.input.state.AbsentStreamStateElement) StateInputStream(org.wso2.siddhi.query.api.execution.query.input.stream.StateInputStream)

Aggregations

StateInputStream (org.wso2.siddhi.query.api.execution.query.input.stream.StateInputStream)6 CountStateElement (org.wso2.siddhi.query.api.execution.query.input.state.CountStateElement)5 EveryStateElement (org.wso2.siddhi.query.api.execution.query.input.state.EveryStateElement)5 NextStateElement (org.wso2.siddhi.query.api.execution.query.input.state.NextStateElement)5 StateElement (org.wso2.siddhi.query.api.execution.query.input.state.StateElement)5 StreamStateElement (org.wso2.siddhi.query.api.execution.query.input.state.StreamStateElement)5 AbsentStreamStateElement (org.wso2.siddhi.query.api.execution.query.input.state.AbsentStreamStateElement)4 ProcessStreamReceiver (org.wso2.siddhi.core.query.input.ProcessStreamReceiver)2 StateStreamRuntime (org.wso2.siddhi.core.query.input.stream.state.StateStreamRuntime)2 LogicalStateElement (org.wso2.siddhi.query.api.execution.query.input.state.LogicalStateElement)2 JoinInputStream (org.wso2.siddhi.query.api.execution.query.input.stream.JoinInputStream)2 SingleInputStream (org.wso2.siddhi.query.api.execution.query.input.stream.SingleInputStream)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 MetaStateEvent (org.wso2.siddhi.core.event.state.MetaStateEvent)1 MetaStreamEvent (org.wso2.siddhi.core.event.stream.MetaStreamEvent)1 OperationNotSupportedException (org.wso2.siddhi.core.exception.OperationNotSupportedException)1 JoinStreamRuntime (org.wso2.siddhi.core.query.input.stream.join.JoinStreamRuntime)1 SingleStreamRuntime (org.wso2.siddhi.core.query.input.stream.single.SingleStreamRuntime)1