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


Java FilterSpecParam类代码示例

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


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

示例1: make

import com.espertech.esper.filter.FilterSpecParam; //导入依赖的package包/类
public static FilterStreamSpecification make(FilterStreamSpecCompiled fssc){
			FilterStreamSpecification fss=new FilterStreamSpecification(fssc);
			fss.setEventTypeName(fss.filterStreamSpec.getFilterSpec().getFilterForEventTypeName());
			fss.setOptionalStreamName(fss.filterStreamSpec.getOptionalStreamName());		
			ViewSpecification[] vss=ViewSpecification.Factory.makeViewSpecs(fss.filterStreamSpec.getViewSpecs());
			fss.setViewSpecs(vss);
			FilterSpecCompiled fsc=fss.filterStreamSpec.getFilterSpec();
			FilterSpecParam[] fsps=fsc.getParameters();
			if(fsps!=null && fsps.length>0){
//				if(fsps[0] instanceof FilterSpecParamExprNode){
//					FilterSpecParamExprNode fspen=(FilterSpecParamExprNode)fsps[0];
//					fss.filterExpr=(IBooleanExpression)(ExpressionFactory.toExpression(fspen.getExprNode()));
//				}
				fss.filterExpr=FilterFactory.toBooleanExpression(fsps, fss.getOptionalStreamName());
			}
			return fss;
		}
 
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:18,代码来源:FilterStreamSpecification.java

示例2: getAuditProxy

import com.espertech.esper.filter.FilterSpecParam; //导入依赖的package包/类
public static EventStream getAuditProxy(String engineURI, String statementName, Annotation[] annotations, FilterSpecCompiled filterSpec, EventStream designated) {
    Audit audit = AuditEnum.STREAM.getAudit(annotations);
    if (audit == null) {
        return designated;
    }

    StringWriter filterAndParams = new StringWriter();
    filterAndParams.write(filterSpec.getFilterForEventType().getName());
    if (filterSpec.getParameters() != null && !filterSpec.getParameters().isEmpty()) {
        filterAndParams.write('(');
        String delimiter = "";
        for (FilterSpecParam param : filterSpec.getParameters()) {
            filterAndParams.write(delimiter);
            filterAndParams.write(param.getLookupable().getExpression());
            filterAndParams.write(param.getFilterOperator().getTextualOp());
            filterAndParams.write("...");
            delimiter = ",";
        }
        filterAndParams.write(')');
    }

    return (EventStream) EventStreamProxy.newInstance(engineURI, statementName, filterAndParams.toString(), designated);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:24,代码来源:EventStreamProxy.java

示例3: registerAdapter

import com.espertech.esper.filter.FilterSpecParam; //导入依赖的package包/类
/**
 * Register an adapter.
 * @param epService engine
 */
public void registerAdapter(EPServiceProvider epService)
{
    EPServiceProviderSPI spi = (EPServiceProviderSPI) epService;
    EventType eventType = spi.getEventAdapterService().getExistsTypeByName(eventTypeName);
    FilterValueSet fvs = new FilterSpecCompiled(eventType, null, new LinkedList<FilterSpecParam>(), null).getValueSet(null, null, null);

    String name = "subscription:" + subscriptionName;
    StatementMetricHandle metricsHandle = spi.getMetricReportingService().getStatementHandle(name, name);
    EPStatementHandle statementHandle = new EPStatementHandle(name, name, name, name, false, metricsHandle, 0, false);
    EPStatementAgentInstanceHandle agentHandle = new EPStatementAgentInstanceHandle(statementHandle, new StatementAgentInstanceRWLockImpl(name, false), -1, new StatementAgentInstanceFilterVersion());
    EPStatementHandleCallback registerHandle = new EPStatementHandleCallback(agentHandle, this);
    spi.getFilterService().add(fvs, registerHandle);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:18,代码来源:BaseSubscription.java


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