本文整理汇总了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);
}
示例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);
}
示例3: DataFlowOpInitializeResult
import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public DataFlowOpInitializeResult(GraphTypeDesc[] typeDescriptors) {
this.typeDescriptors = typeDescriptors;
}
示例4: getTypeDescriptors
import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public GraphTypeDesc[] getTypeDescriptors() {
return typeDescriptors;
}
示例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;
}
示例6: getTypeDesc
import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public GraphTypeDesc getTypeDesc() {
return typeDesc;
}
示例7: DataFlowOpOutputPort
import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public DataFlowOpOutputPort(String streamName, GraphTypeDesc optionalDeclaredType) {
this.streamName = streamName;
this.optionalDeclaredType = optionalDeclaredType;
}
示例8: getOptionalDeclaredType
import com.espertech.esper.dataflow.util.GraphTypeDesc; //导入依赖的package包/类
public GraphTypeDesc getOptionalDeclaredType() {
return optionalDeclaredType;
}