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


Java EPRuntimeSPI类代码示例

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


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

示例1: setUp

import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public void setUp()
{
    Configuration configuration = SupportConfigFactory.getConfiguration();
    configuration.getEngineDefaults().getViewResources().setShareViews(false);
    configuration.addEventType("SupportBean", SupportBean.class.getName());
    epService = EPServiceProviderManager.getDefaultProvider(configuration);
    epService.initialize();
    runtimeSPI = (EPRuntimeSPI) epService.getEPRuntime();
    listener = new SupportUpdateListener();
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:11,代码来源:TestTimeControlEvent.java

示例2: StmtNamedWindowUpdateCallable

import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public StmtNamedWindowUpdateCallable(String threadName, EPServiceProvider engine, int numRepeats) {
    this.engine = (EPRuntimeSPI) engine.getEPRuntime();
    this.numRepeats = numRepeats;
    this.threadName = threadName;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:6,代码来源:StmtNamedWindowUpdateCallable.java

示例3: StmtNamedWindowMergeCallable

import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public StmtNamedWindowMergeCallable(EPServiceProvider engine, int numEvents) {
    this.engine = (EPRuntimeSPI) engine.getEPRuntime();
    this.numEvents = numEvents;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:5,代码来源:StmtNamedWindowMergeCallable.java

示例4: StmtNamedWindowQueryCallable

import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public StmtNamedWindowQueryCallable(String threadKey, EPServiceProvider engine, int numRepeats) {
    this.engine = (EPRuntimeSPI) engine.getEPRuntime();
    this.numRepeats = numRepeats;
    this.threadKey = threadKey;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:6,代码来源:StmtNamedWindowQueryCallable.java

示例5: runAssertionNextScheduledTime

import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
private void runAssertionNextScheduledTime(EPServiceProvider epService) {

        EPRuntimeSPI runtimeSPI = (EPRuntimeSPI) epService.getEPRuntime();

        epService.getEPRuntime().sendEvent(new CurrentTimeEvent(0));
        assertNull(epService.getEPRuntime().getNextScheduledTime());
        assertSchedules(runtimeSPI.getStatementNearestSchedules(), new Object[0][]);

        EPStatement stmtOne = epService.getEPAdministrator().createEPL("select * from pattern[timer:interval(2 sec)]");
        assertEquals(2000L, (long) epService.getEPRuntime().getNextScheduledTime());
        assertSchedules(runtimeSPI.getStatementNearestSchedules(), new Object[][]{{stmtOne.getName(), 2000L}});

        EPStatement stmtTwo = epService.getEPAdministrator().createEPL("@Name('s2') select * from pattern[timer:interval(150 msec)]");
        assertEquals(150L, (long) epService.getEPRuntime().getNextScheduledTime());
        assertSchedules(runtimeSPI.getStatementNearestSchedules(), new Object[][]{{"s2", 150L}, {stmtOne.getName(), 2000L}});

        stmtTwo.destroy();
        assertEquals(2000L, (long) epService.getEPRuntime().getNextScheduledTime());
        assertSchedules(runtimeSPI.getStatementNearestSchedules(), new Object[][]{{stmtOne.getName(), 2000L}});

        EPStatement stmtThree = epService.getEPAdministrator().createEPL("select * from pattern[timer:interval(3 sec) and timer:interval(4 sec)]");
        assertEquals(2000L, (long) epService.getEPRuntime().getNextScheduledTime());
        assertSchedules(runtimeSPI.getStatementNearestSchedules(), new Object[][]{{stmtOne.getName(), 2000L}, {stmtThree.getName(), 3000L}});

        epService.getEPRuntime().sendEvent(new CurrentTimeEvent(2500));
        assertEquals(3000L, (long) epService.getEPRuntime().getNextScheduledTime());
        assertSchedules(runtimeSPI.getStatementNearestSchedules(), new Object[][]{{stmtThree.getName(), 3000L}});

        epService.getEPRuntime().sendEvent(new CurrentTimeEvent(3500));
        assertEquals(4000L, (long) epService.getEPRuntime().getNextScheduledTime());
        assertSchedules(runtimeSPI.getStatementNearestSchedules(), new Object[][]{{stmtThree.getName(), 4000L}});

        epService.getEPRuntime().sendEvent(new CurrentTimeEvent(4500));
        assertEquals(null, epService.getEPRuntime().getNextScheduledTime());
        assertSchedules(runtimeSPI.getStatementNearestSchedules(), new Object[0][]);

        // test isolated service
        EPServiceProviderIsolated isolated = epService.getEPServiceIsolated("I1");
        EPRuntimeIsolatedSPI isolatedSPI = (EPRuntimeIsolatedSPI) isolated.getEPRuntime();

        isolated.getEPRuntime().sendEvent(new CurrentTimeEvent(0));
        assertNull(isolated.getEPRuntime().getNextScheduledTime());
        assertSchedules(isolatedSPI.getStatementNearestSchedules(), new Object[0][]);

        EPStatement stmtFour = isolated.getEPAdministrator().createEPL("select * from pattern[timer:interval(2 sec)]", null, null);
        assertEquals(2000L, (long) isolatedSPI.getNextScheduledTime());
        assertSchedules(isolatedSPI.getStatementNearestSchedules(), new Object[][]{{stmtFour.getName(), 2000L}});

        isolated.destroy();
        epService.getEPAdministrator().destroyAllStatements();
    }
 
开发者ID:espertechinc,项目名称:esper,代码行数:52,代码来源:ExecClientTimeControlEvent.java

示例6: StmtNamedWindowUpdateCallable

import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public StmtNamedWindowUpdateCallable(String threadName, EPServiceProvider engine, int numRepeats)
{
    this.engine = (EPRuntimeSPI) engine.getEPRuntime();
    this.numRepeats = numRepeats;
    this.threadName = threadName;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:7,代码来源:StmtNamedWindowUpdateCallable.java

示例7: StmtNamedWindowMergeCallable

import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public StmtNamedWindowMergeCallable(EPServiceProvider engine, int numEvents)
{
    this.engine = (EPRuntimeSPI) engine.getEPRuntime();
    this.numEvents = numEvents;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:6,代码来源:StmtNamedWindowMergeCallable.java

示例8: StmtNamedWindowQueryCallable

import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public StmtNamedWindowQueryCallable(String threadKey, EPServiceProvider engine, int numRepeats)
{
    this.engine = (EPRuntimeSPI) engine.getEPRuntime();
    this.numRepeats = numRepeats;
    this.threadKey = threadKey;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:7,代码来源:StmtNamedWindowQueryCallable.java


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