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


Java Configuration.addImport方法代码示例

本文整理汇总了Java中com.espertech.esper.client.Configuration.addImport方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.addImport方法的具体用法?Java Configuration.addImport怎么用?Java Configuration.addImport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.espertech.esper.client.Configuration的用法示例。


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

示例1: getEngineWKafkaOutput

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public static EPServiceProvider getEngineWKafkaOutput(String uri, Properties pluginProperties) {
    Configuration engineConfig = new Configuration();
    engineConfig.addImport(KafkaOutputDefault.class);
    engineConfig.getEngineDefaults().getThreading().setInternalTimerEnabled(false);
    engineConfig.addPluginLoader(EsperIOKafkaOutputAdapterPlugin.class.getSimpleName(), EsperIOKafkaOutputAdapterPlugin.class.getName(), pluginProperties, null);
    return EPServiceProviderManager.getProvider(uri, engineConfig);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:8,代码来源:SupportConstants.java

示例2: registerConfiguration

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
/**
 * Inject in Esper Configuration geospatial methods and classes
 * @param configuration
 */
public static void registerConfiguration(Configuration configuration) {

    // Inject methods to create Geometry variables
    configuration.addPlugInSingleRowFunction("polygon",  Geospatial.class.getName(), "createPolygon");
    configuration.addPlugInSingleRowFunction("point", Geospatial.class.getName(), "createPoint");
    configuration.addPlugInSingleRowFunction("geometry", Geospatial.class.getName(), "readGeometry");

    // Register Geometry class
    configuration.addImport(Geometry.class.getName());
}
 
开发者ID:Orange-OpenSource,项目名称:fiware-cepheus,代码行数:15,代码来源:Geospatial.java

示例3: makeConfig

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
private Configuration makeConfig(String typeName, boolean useBean) {
    Configuration configuration = new Configuration();
    configuration.addImport(FileSourceCSV.class.getPackage().getName() + ".*");
    if (useBean) {
        configuration.addEventType(typeName, ExampleMarketDataBean.class);
    } else {
        Map<String, Object> eventProperties = new HashMap<String, Object>();
        eventProperties.put("symbol", String.class);
        eventProperties.put("price", double.class);
        eventProperties.put("volume", Integer.class);
        configuration.addEventType(typeName, eventProperties);
    }

    return configuration;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:16,代码来源:TestCSVAdapterUseCases.java

示例4: testReadWritePropsBean

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void testReadWritePropsBean() {
    Configuration configuration = new Configuration();
    configuration.addEventType("ReadWrite", ExampleMarketDataBeanReadWrite.class);
    configuration.addImport(FileSourceCSV.class.getPackage().getName() + ".*");

    epService = EPServiceProviderManager.getProvider("testExistingTypeNoOptions", configuration);
    epService.initialize();

    EPStatement stmt = epService.getEPAdministrator().createEPL("select * from ReadWrite#length(100)");
    SupportUpdateListener listener = new SupportUpdateListener();
    stmt.addListener(listener);

    (new CSVInputAdapter(epService, new AdapterInputSource(CSV_FILENAME_ONELINE_TRADE), "ReadWrite")).start();

    assertEquals(1, listener.getNewDataList().size());
    EventBean eb = listener.getNewDataList().get(0)[0];
    assertTrue(ExampleMarketDataBeanReadWrite.class == eb.getUnderlying().getClass());
    assertEquals(55.5 * 1000, eb.get("value"));

    // test graph
    String graph = "create dataflow ReadCSV " +
            "FileSource -> mystream<ReadWrite> { file: '" + CSV_FILENAME_ONELINE_TRADE + "', hasTitleLine: true, classpathFile: true }" +
            "DefaultSupportCaptureOp(mystream) {}";
    epService.getEPAdministrator().createEPL(graph);

    DefaultSupportCaptureOp<Object> outputOp = new DefaultSupportCaptureOp<Object>();
    EPDataFlowInstance instance = epService.getEPRuntime().getDataFlowRuntime().instantiate("ReadCSV", new EPDataFlowInstantiationOptions().operatorProvider(new DefaultSupportGraphOpProvider(outputOp)));
    instance.run();
    Object[] received = outputOp.getAndReset().get(0).toArray();
    assertEquals(1, received.length);
    assertEquals(55.5 * 1000, ((ExampleMarketDataBeanReadWrite) received[0]).getValue());
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:33,代码来源:TestCSVAdapterUseCasesBean.java

示例5: setUp

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
protected void setUp() {
    Configuration configuration = new Configuration();
    configuration.getEngineDefaults().getThreading().setInternalTimerEnabled(false);
    configuration.addImport(FileSinkFactory.class.getPackage().getName() + ".*");
    configuration.addImport(DefaultSupportSourceOp.class.getName());
    epService = EPServiceProviderManager.getDefaultProvider(configuration);
    epService.initialize();

    DefaultSupportGraphEventUtil.addTypeConfiguration(epService);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:11,代码来源:TestFileSinkGraphs.java

示例6: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    configuration.addMethodRef(MyStaticService.class, new ConfigurationMethodRef());
    configuration.addImport(MyStaticService.class);

    configuration.getEngineDefaults().getLogging().setEnableQueryPlan(true);
    configuration.addEventType(SupportBean.class);
    configuration.addEventType(SupportBean_S0.class);
    configuration.addEventType(SupportBean_S1.class);
    configuration.addEventType(SupportBean_S2.class);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:11,代码来源:ExecFromClauseMethodVariable.java

示例7: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    configuration.getEngineDefaults().getLogging().setEnableQueryPlan(true);
    configuration.getEngineDefaults().getLogging().setEnableCode(true);
    configuration.getEngineDefaults().getByteCodeGeneration().setIncludeDebugSymbols(true);

    configuration.addEventType(SupportBeanInt.class);
    configuration.addImport(SupportJoinMethods.class.getName());
    configuration.addVariable("var1", Integer.class, 0);
    configuration.addVariable("var2", Integer.class, 0);
    configuration.addVariable("var3", Integer.class, 0);
    configuration.addVariable("var4", Integer.class, 0);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:13,代码来源:ExecFromClauseMethodNStream.java

示例8: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    configuration.addEventType(SupportBeanInt.class);
    configuration.addEventType(SupportBean.class);
    configuration.addImport(SupportJoinMethods.class.getName());
    configuration.addVariable("var1", Integer.class, 0);
    configuration.addVariable("var2", Integer.class, 0);
    configuration.addVariable("var3", Integer.class, 0);
    configuration.addVariable("var4", Integer.class, 0);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:10,代码来源:ExecFromClauseMethodOuterNStream.java

示例9: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    configuration.getEngineDefaults().getThreading().setInternalTimerEnabled(true);
    configuration.getEngineDefaults().getExpression().setUdfCache(false);
    configuration.getEngineDefaults().getThreading().setThreadPoolRouteExec(true);
    configuration.getEngineDefaults().getThreading().setThreadPoolRouteExecNumThreads(5);
    configuration.addEventType("SupportBean", SupportBean.class);
    configuration.addImport(SupportStaticMethodLib.class.getName());
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:ExecClientThreadedConfigRoute.java

示例10: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    configuration.getEngineDefaults().getThreading().setInternalTimerEnabled(false);
    configuration.getEngineDefaults().getExpression().setUdfCache(false);
    configuration.getEngineDefaults().getThreading().setThreadPoolTimerExec(true);
    configuration.getEngineDefaults().getThreading().setThreadPoolTimerExecNumThreads(5);
    configuration.addEventType("MyMap", new HashMap<>());
    configuration.addImport(SupportStaticMethodLib.class.getName());
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:ExecClientThreadedConfigTimer.java

示例11: applyMetricsConfig

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
protected static void applyMetricsConfig(Configuration configuration, long engineMetricInterval, long stmtMetricInterval, boolean shareViews) {
    configuration.getEngineDefaults().getViewResources().setShareViews(shareViews);
    configuration.getEngineDefaults().getMetricsReporting().setEnableMetricsReporting(true);
    configuration.getEngineDefaults().getMetricsReporting().setThreading(false);
    configuration.getEngineDefaults().getMetricsReporting().setEngineInterval(engineMetricInterval);
    configuration.getEngineDefaults().getMetricsReporting().setStatementInterval(stmtMetricInterval);
    configuration.addImport(MyMetricFunctions.class.getName());
    configuration.addEventType("SupportBean", SupportBean.class);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:10,代码来源:ExecClientMetricsReportingNW.java

示例12: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    configuration.addEventType("SupportBean", SupportBean.class);
    configuration.addEventType("SupportBean_ST0_Container", SupportBean_ST0_Container.class);
    configuration.addEventType("SupportDateTime", SupportDateTime.class);
    configuration.addImport(SupportBean_ST0_Container.class);
    configuration.addPlugInSingleRowFunction("makeTest", SupportBean_ST0_Container.class.getName(), "makeTest");
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:8,代码来源:ExecDTInvalid.java

示例13: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    configuration.addEventType("SupportBean", SupportBean.class);
    configuration.addEventType("SupportBean_ST0", SupportBean_ST0.class);
    configuration.addEventType("SupportBean_ST0_Container", SupportBean_ST0_Container.class);
    configuration.addEventType("SupportBeanComplexProps", SupportBeanComplexProps.class);
    configuration.addEventType("SupportCollection", SupportCollection.class);
    configuration.addImport(SupportBean_ST0_Container.class);
    configuration.addPlugInSingleRowFunction("makeTest", SupportBean_ST0_Container.class.getName(), "makeTest");
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:10,代码来源:ExecEnumInvalid.java

示例14: setUp

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
protected void setUp() {
    Configuration configuration = new Configuration();
    configuration.getEngineDefaults().getThreading().setInternalTimerEnabled(false);
    configuration.addImport(AMQPSource.class);
    configuration.addImport(AMQPSink.class);
    epService = EPServiceProviderManager.getDefaultProvider(configuration);
    epService.initialize();
    epService.getEPRuntime().sendEvent(new TimerControlEvent(TimerControlEvent.ClockType.CLOCK_EXTERNAL));
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:10,代码来源:TestAMQPGraphs.java

示例15: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    configuration.addEventType("MyEvent", SupportRecogBean.class);
    configuration.addImport(SupportStaticMethodLib.class.getName());
    configuration.addImport(Hint.class.getName());
    configuration.addVariable("mySleepDuration", long.class, 100);    // msec
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:7,代码来源:ExecRowRecogIterateOnly.java


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