当前位置: 首页>>代码示例>>Java>>正文


Java GraphTypeDesc类代码示例

本文整理汇总了Java中com.espertech.esper.dataflow.util.GraphTypeDesc的典型用法代码示例。如果您正苦于以下问题:Java GraphTypeDesc类的具体用法?Java GraphTypeDesc怎么用?Java GraphTypeDesc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GraphTypeDesc类属于com.espertech.esper.dataflow.util包,在下文中一共展示了GraphTypeDesc类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public DataFlowOpInitializeResult initialize(DataFlowOpInitializateContext prepareContext) throws Exception {

        if (prepareContext.getInputPorts().size() != 1) {
            throw new ExprValidationException("Filter requires single input port");
        }
        if (filter == null) {
            throw new ExprValidationException("Required parameter 'filter' providing the filter expression is not provided");
        }
        if (prepareContext.getOutputPorts().isEmpty() || prepareContext.getOutputPorts().size() > 2) {
            throw new IllegalArgumentException("Filter operator requires one or two output stream(s) but produces " + prepareContext.getOutputPorts().size() + " streams");
        }

        EventType eventType = prepareContext.getInputPorts().get(0).getTypeDesc().getEventType();
        singleOutputPort = prepareContext.getOutputPorts().size() == 1;

        ExprNode validated = EPLValidationUtil.validateSimpleGetSubtree(ExprNodeOrigin.DATAFLOWFILTER, filter, prepareContext.getStatementContext(), eventType, false);
        evaluator = ExprNodeCompiler.allocateEvaluator(validated.getForge(), prepareContext.getServicesContext().getEngineImportService(), Filter.class, false, prepareContext.getStatementContext().getStatementName());
        theEvent = prepareContext.getServicesContext().getEventAdapterService().getShellForType(eventType);
        eventsPerStream[0] = theEvent;

        GraphTypeDesc[] typesPerPort = new GraphTypeDesc[prepareContext.getOutputPorts().size()];
        for (int i = 0; i < typesPerPort.length; i++) {
            typesPerPort[i] = new GraphTypeDesc(false, true, eventType);
        }
        return new DataFlowOpInitializeResult(typesPerPort);
    }
 
开发者ID:espertechinc,项目名称:esper,代码行数:27,代码来源:Filter.java

示例2: initialize

import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public DataFlowOpInitializeResult initialize(DataFlowOpInitializateContext prepareContext) throws Exception {

        if (prepareContext.getInputPorts().size() != 1) {
            throw new ExprValidationException("Filter requires single input port");
        }
        if (filter == null) {
            throw new ExprValidationException("Required parameter 'filter' providing the filter expression is not provided");
        }
        if (prepareContext.getOutputPorts().isEmpty() || prepareContext.getOutputPorts().size() > 2) {
            throw new IllegalArgumentException("Filter operator requires one or two output stream(s) but produces " + prepareContext.getOutputPorts().size() + " streams");
        }

        EventType eventType = prepareContext.getInputPorts().get(0).getTypeDesc().getEventType();
        singleOutputPort = prepareContext.getOutputPorts().size() == 1;

        ExprNode validated = ExprNodeUtility.validateSimpleGetSubtree(filter, prepareContext.getStatementContext(), eventType);
        evaluator = validated.getExprEvaluator();
        theEvent = prepareContext.getServicesContext().getEventAdapterService().getShellForType(eventType);
        eventsPerStream[0] = theEvent;

        GraphTypeDesc[] typesPerPort = new GraphTypeDesc[prepareContext.getOutputPorts().size()];
        for (int i = 0; i < typesPerPort.length; i++) {
            typesPerPort[i] = new GraphTypeDesc(false, true, eventType);
        }
        return new DataFlowOpInitializeResult(typesPerPort);
    }
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:27,代码来源:Filter.java

示例3: DataFlowOpInitializeResult

import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public DataFlowOpInitializeResult(GraphTypeDesc[] typeDescriptors) {
    this.typeDescriptors = typeDescriptors;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:4,代码来源:DataFlowOpInitializeResult.java

示例4: getTypeDescriptors

import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public GraphTypeDesc[] getTypeDescriptors() {
    return typeDescriptors;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:4,代码来源:DataFlowOpInitializeResult.java

示例5: DataFlowOpInputPort

import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public DataFlowOpInputPort(GraphTypeDesc typeDesc, Set<String> streamNames, String optionalAlias, boolean hasPunctuationSignal) {
    this.typeDesc = typeDesc;
    this.streamNames = streamNames;
    this.optionalAlias = optionalAlias;
    this.hasPunctuationSignal = hasPunctuationSignal;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:7,代码来源:DataFlowOpInputPort.java

示例6: getTypeDesc

import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public GraphTypeDesc getTypeDesc() {
    return typeDesc;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:4,代码来源:DataFlowOpInputPort.java

示例7: DataFlowOpOutputPort

import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public DataFlowOpOutputPort(String streamName, GraphTypeDesc optionalDeclaredType) {
    this.streamName = streamName;
    this.optionalDeclaredType = optionalDeclaredType;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:5,代码来源:DataFlowOpOutputPort.java

示例8: getOptionalDeclaredType

import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public GraphTypeDesc getOptionalDeclaredType() {
    return optionalDeclaredType;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:4,代码来源:DataFlowOpOutputPort.java


注:本文中的com.espertech.esper.dataflow.util.GraphTypeDesc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。