public void onDeployment(DeploymentStateEventDeployed event) { for (EPStatement stmt : event.getStatements()) { stmt.addListener(listener); } }
public void destroy() throws EPUndeployException { EPRuntimeProvider.getRuntime(runtimeURI).getDeploymentService().undeployAll(); } }
public RegressionEnvironment sendEventObjectArray(Object[] oa, String typeName) { runtime.getEventService().sendEventObjectArray(oa, typeName); return this; }
public static void deployAddListener(EPCompiled compiledStmt, String stmtName, UpdateListener listener, EPRuntime runtime) { try { EPDeployment deployed = runtime.getDeploymentService().deploy(compiledStmt, new DeploymentOptions().setStatementNameRuntime(ctx -> stmtName)); if (deployed.getStatements().length != 1) { throw new UnsupportedOperationException("This method is designed for a single statement"); } deployed.getStatements()[0].addListener(listener); } catch (EPDeployException e) { throw new RuntimeException(e); } }
public void destroy() { if (main != null) { try { EPRuntimeProvider.getRuntime(runtimeURI).getDeploymentService().undeployAll(); } catch (EPUndeployException e) { log.warn("Exception during undeploy: " + e.getMessage(), e); } } log.info("NamedWindowQuery-example stopped."); } }
public static void deploy(EPRuntime runtime, EPCompiled compiled) { try { runtime.getDeploymentService().deploy(compiled, new DeploymentOptions().setDeploymentId("stockticker")); } catch (EPDeployException ex) { throw new RuntimeException(ex); } } }
public void update(EventBean[] newEvents, EventBean[] oldEvents, EPStatement statement, EPRuntime runtime) { try { runtime.getDeploymentService().undeploy(spikeLatencyAlert.getDeploymentId()); } catch (EPUndeployException e) { log.warn("Failed to undeploy: " + e.getMessage(), e); } } });
public String deployGetId(EPCompiled compiled) { try { return runtime().getDeploymentService().deploy(compiled).getDeploymentId(); } catch (EPDeployException ex) { throw notExpected(ex); } }
public void sendEventBean(Object theEvent, String eventTypeName) { runtime.getEventService().sendEventBean(theEvent, eventTypeName); } }
public RegressionEnvironment sendEventMap(Map<String, Object> values, String typeName) { runtime.getEventService().sendEventMap(values, typeName); return this; }
public RegressionEnvironment advanceTime(long msec) { runtime.getEventService().advanceTime(msec); return this; }
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 sendEventAvro(GenericData.Record theEvent, String typeName) { runtime.getEventService().sendEventAvro(theEvent, typeName); return this; }
public EPFireAndForgetQueryResult executeQuery(EPCompiled compiled) { return runtime.getFireAndForgetService().executeQuery(compiled); }
public void onDeployment(DeploymentStateEventDeployed event) { for (EPStatement statement : event.getStatements()) { processStatement(statement); } }
public void onUndeployment(DeploymentStateEventUndeployed event) { for (EPStatement statement : event.getStatements()) { detachStatement(statement); } } });
public void destroy() { if (main != null) { try { EPRuntimeProvider.getRuntime(runtimeURI).getDeploymentService().undeployAll(); } catch (EPUndeployException e) { log.warn("Failed to undeploy: " + e.getMessage(), e); } } log.info("OHLCSample-example stopped."); } }
public RegressionEnvironment sendEventBean(Object event, String typeName) { runtime.getEventService().sendEventBean(event, typeName); return this; }
private static void sendTimer(EPRuntime runtime, long timestamp) { runtime.getEventService().advanceTime(timestamp); }