本文整理汇总了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();
}
示例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;
}
示例3: StmtNamedWindowMergeCallable
import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public StmtNamedWindowMergeCallable(EPServiceProvider engine, int numEvents) {
this.engine = (EPRuntimeSPI) engine.getEPRuntime();
this.numEvents = numEvents;
}
示例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;
}
示例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();
}
示例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;
}
示例7: StmtNamedWindowMergeCallable
import com.espertech.esper.core.service.EPRuntimeSPI; //导入依赖的package包/类
public StmtNamedWindowMergeCallable(EPServiceProvider engine, int numEvents)
{
this.engine = (EPRuntimeSPI) engine.getEPRuntime();
this.numEvents = numEvents;
}
示例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;
}