private static SupportCallEvent sendEvent(EPEventService runtime, long callId, String source, String destination, long startTime, long endTime) { SupportCallEvent theEvent = new SupportCallEvent(callId, source, destination, startTime, endTime); runtime.sendEventBean(theEvent, SupportCallEvent.class.getSimpleName()); return theEvent; }
public void run() { for (int i = 0; i < values.length; i++) { runtime.sendEventBean(new SupportBean_S0(values[i]), "S0"); } } }
public RegressionEnvironment sendEventBean(Object event) { runtime.getEventService().sendEventBean(event, event.getClass().getSimpleName()); return this; }
private SupportBean_A sendSupportBean_A(String id) { SupportBean_A bean = new SupportBean_A(id); runtime.getEventService().sendEventBean(bean, bean.getClass().getSimpleName()); return bean; }
public void run() { try { for (int i = 0; i < numRepeats; i++) { runtime.getEventService().sendEventBean(new SentenceEvent("This is stateless statement testing"), "SentenceEvent"); if (i % 10000 == 0) { log.info("Thread " + Thread.currentThread().getId() + " sending event " + i); } } } catch (Throwable t) { exception = t; } }
public void onMessage(Message message) { BytesMessage bytesMsg = (BytesMessage) message; String body = getBody(bytesMsg); String[] payload = body.split(","); String ipAddress = payload[0]; double duration = Double.parseDouble(payload[1]); SampleEvent theEvent = new SampleEvent(ipAddress, duration); runtime.sendEventBean(theEvent, "SampleEvent"); count++; }
public void run() { log.info("Starting filter thread"); for (int i = 0; i < numEvents; i++) { runtime.getEventService().sendEventBean(new SupportBean("G" + i, i), "SupportBean"); } log.info("Completed filter thread, " + numEvents + " completed"); } }
public void run() { log.info("Starting insert thread"); for (int i = 0; i < numInserts; i++) { runtime.getEventService().sendEventBean(new SupportBean_S0(i, "E"), "SupportBean_S0"); } log.info("Completed insert thread, " + numInserts + " inserted"); } }
private static SupportBean makeSendEvent(RegressionEnvironment env, String theString, int intPrimitive) { SupportBean b = new SupportBean(theString, intPrimitive); env.eventService().sendEventBean(b, b.getClass().getSimpleName()); return b; }
public void run() { for (int i = 0; i < 33; i++) { EventOne eventOne = new EventOne("TEST"); runtime.getEventService().sendEventBean(eventOne, eventOne.getClass().getSimpleName()); EventTwo eventTwo = new EventTwo("TEST"); runtime.getEventService().sendEventBean(eventTwo, eventTwo.getClass().getSimpleName()); } } };
public void run() { for (int i = 0; i < 33; i++) { EventTwo eventTwo = new EventTwo("TEST"); runtime.getEventService().sendEventBean(eventTwo, eventTwo.getClass().getSimpleName()); EventOne eventOne = new EventOne("TEST"); runtime.getEventService().sendEventBean(eventOne, eventOne.getClass().getSimpleName()); } } };
public void run() { for (int i = 0; i < 34; i++) { EventTwo eventTwo = new EventTwo("TEST"); runtime.getEventService().sendEventBean(eventTwo, eventTwo.getClass().getSimpleName()); EventOne eventOne = new EventOne("TEST"); runtime.getEventService().sendEventBean(eventOne, eventOne.getClass().getSimpleName()); } } };
public Object call() throws Exception { try { int offset = threadNum + 1000000; for (int i = 0; i < numRepeats; i++) { runtime.getEventService().sendEventBean(new SupportBean_S0(i + offset, "c0_" + i + offset, "p01_" + i + offset), "SupportBean_S0"); runtime.getEventService().sendEventBean(new SupportBean_S1(i + offset, "c0_" + i + offset, "x", "y"), "SupportBean_S1"); } } catch (Exception ex) { log.error("Error in thread " + Thread.currentThread().getId(), ex); return false; } return true; }
private void sendMarketBean(String symbol, long volume) { SupportMarketDataBean bean = new SupportMarketDataBean(symbol, 0, volume, ""); runtime.getEventService().sendEventBean(bean, bean.getClass().getSimpleName()); }
public void run() { try { while (!shutdown) { runtime.getEventService().sendEventBean(new SupportBean(null, current++), "SupportBean"); Thread.sleep(50); } } catch (Throwable t) { throwable = t; } }
private void sendEvent() { long id = idCounter.getAndIncrement(); SupportBean theEvent = new SupportBean(); theEvent.setLongPrimitive(id); epRuntime.sendEventBean(theEvent, "SupportBean"); }
private static void sendEvent(EPRuntime runtime, int intValue) { SupportBean theEvent = new SupportBean(); theEvent.setIntPrimitive(intValue); runtime.getEventService().sendEventBean(theEvent, theEvent.getClass().getSimpleName()); }
public void run() { try { for (int i = 0; i < 2000000; i++) { PayloadEvent payloadEvent = new PayloadEvent("A1"); runtime.getEventService().sendEventBean(payloadEvent, "PayloadEvent"); } } catch (Exception ex) { this.exception = ex; } } }
private void runSubquerySample(EPRuntime runtime) { String epl = "select (select key2 from MySampleWindow where key1 = ste.triggerKey) as key2 from SampleTriggerEvent ste"; EPStatement stmt = compileDeploy(epl, runtime); SampleUpdateListener sampleListener = new SampleUpdateListener(); stmt.addListener(sampleListener); runtime.getEventService().sendEventBean(new SampleTriggerEvent("sample1"), "SampleTriggerEvent"); log.info("Subquery returned: " + sampleListener.getLastEvent().get("key2")); // For assertions against expected results please see the regression test suite }
private void runJoinSample(EPRuntime runtime) { String epl = "select sw.* " + "from SampleJoinEvent#lastevent sje, MySampleWindow sw " + "where sw.key1 = sje.propOne and sw.key2 = sje.propTwo"; EPStatement stmt = compileDeploy(epl, runtime); SampleUpdateListener sampleListener = new SampleUpdateListener(); stmt.addListener(sampleListener); runtime.getEventService().sendEventBean(new SampleJoinEvent("sample1", "sample2"), "SampleJoinEvent"); // see values in SampleVirtualDataWindowIndex log.info("Join query returned: " + sampleListener.getLastEvent().get("key1") + " and " + sampleListener.getLastEvent().get("key2")); // For assertions against expected results please see the regression test suite }