Search in sources :

Example 31 with AbstractDefinition

use of org.wso2.siddhi.query.api.definition.AbstractDefinition in project siddhi by wso2.

the class SiddhiAppRuntimeBuilder method defineStream.

public void defineStream(StreamDefinition streamDefinition) {
    DefinitionParserHelper.validateDefinition(streamDefinition, streamDefinitionMap, tableDefinitionMap, windowDefinitionMap, aggregationDefinitionMap);
    AbstractDefinition currentDefinition = streamDefinitionMap.putIfAbsent(streamDefinition.getId(), streamDefinition);
    if (currentDefinition != null) {
        streamDefinition = (StreamDefinition) currentDefinition;
    }
    try {
        DefinitionParserHelper.addStreamJunction(streamDefinition, streamJunctionMap, siddhiAppContext);
    } catch (Throwable t) {
        ExceptionUtil.populateQueryContext(t, streamDefinition, siddhiAppContext);
        throw t;
    }
    DefinitionParserHelper.addEventSource(streamDefinition, sourceMap, siddhiAppContext);
    DefinitionParserHelper.addEventSink(streamDefinition, sinkMap, siddhiAppContext);
}
Also used : AbstractDefinition(org.wso2.siddhi.query.api.definition.AbstractDefinition)

Aggregations

AbstractDefinition (org.wso2.siddhi.query.api.definition.AbstractDefinition)17 MetaStreamEvent (org.wso2.siddhi.core.event.stream.MetaStreamEvent)15 MetaStateEvent (org.wso2.siddhi.core.event.state.MetaStateEvent)14 Attribute (org.wso2.siddhi.query.api.definition.Attribute)13 VariableExpressionExecutor (org.wso2.siddhi.core.executor.VariableExpressionExecutor)10 ArrayList (java.util.ArrayList)9 SiddhiAppCreationException (org.wso2.siddhi.core.exception.SiddhiAppCreationException)9 ExpressionExecutor (org.wso2.siddhi.core.executor.ExpressionExecutor)6 StreamDefinition (org.wso2.siddhi.query.api.definition.StreamDefinition)6 Expression (org.wso2.siddhi.query.api.expression.Expression)6 Variable (org.wso2.siddhi.query.api.expression.Variable)6 OperationNotSupportedException (org.wso2.siddhi.core.exception.OperationNotSupportedException)5 ConstantExpressionExecutor (org.wso2.siddhi.core.executor.ConstantExpressionExecutor)5 SingleStreamRuntime (org.wso2.siddhi.core.query.input.stream.single.SingleStreamRuntime)5 MatchingMetaInfoHolder (org.wso2.siddhi.core.util.collection.operator.MatchingMetaInfoHolder)5 SiddhiAppValidationException (org.wso2.siddhi.query.api.exception.SiddhiAppValidationException)5 HashMap (java.util.HashMap)4 Table (org.wso2.siddhi.core.table.Table)4 AttributeFunction (org.wso2.siddhi.query.api.expression.AttributeFunction)4 Scheduler (org.wso2.siddhi.core.util.Scheduler)3