public StmtNamedWindowUpdateCallable(String threadName, EPRuntime runtime, int numRepeats) { this.runtime = (EPEventServiceSPI) runtime.getEventService(); this.numRepeats = numRepeats; this.threadName = threadName; }
private void sendEvent(String key, int intupd) { Map<String, Object> theEvent = new HashMap<String, Object>(); theEvent.put("uekey", key); theEvent.put("ueint", intupd); runtime.getEventService().sendEventMap(theEvent, "UpdateEvent"); }
public RegressionEnvironment sendEventObjectArray(Object[] oa, String typeName) { runtime.getEventService().sendEventObjectArray(oa, typeName); return this; }
public void sendEventBean(Object theEvent, String eventTypeName) { runtime.getEventService().sendEventBean(theEvent, eventTypeName); } }
public RegressionEnvironment sendEventXMLDOM(Node document, String typeName) { runtime.getEventService().sendEventXMLDOM(document, typeName); return this; }
public RegressionEnvironment advanceTimeSpan(long msec) { runtime.getEventService().advanceTimeSpan(msec); return this; }
public RegressionEnvironment sendEventBean(Object event) { runtime.getEventService().sendEventBean(event, event.getClass().getSimpleName()); return this; }
public RegressionEnvironment sendEventAvro(GenericData.Record theEvent, String typeName) { runtime.getEventService().sendEventAvro(theEvent, typeName); return this; }
public void run() { try { for (Map theEvent : events) { runtime.getEventService().sendEventMap(theEvent, type); } } catch (Throwable t) { lastException = t; t.printStackTrace(); } }
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 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() { 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"); } }
private void sendMarketBean(String symbol, long volume) { SupportMarketDataBean bean = new SupportMarketDataBean(symbol, 0, volume, ""); runtime.getEventService().sendEventBean(bean, bean.getClass().getSimpleName()); }
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() { try { while (!shutdown) { runtime.getEventService().sendEventBean(new SupportBean(null, current++), "SupportBean"); Thread.sleep(50); } } catch (Throwable t) { throwable = t; } }
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 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 }