public RegressionEnvironment undeploy(String deploymentId) { try { runtime.getDeploymentService().undeploy(deploymentId); } catch (EPUndeployException ex) { throw notExpected(ex); } return this; }
private static void assertCannotUndeploy(RegressionEnvironment env, String statementNames) { String[] names = statementNames.split(","); for (String name : names) { try { env.deployment().undeploy(env.deploymentId(name)); fail(); } catch (EPUndeployPreconditionException ex) { // expected } catch (EPUndeployException 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 void destroy() throws EPException { if ((ExecutionPathDebugLog.isDebugEnabled) && (log.isDebugEnabled())) { log.debug(".destroy"); } for (String deployment : deploymentIds) { try { spi.getDeploymentService().undeploy(deployment); } catch (EPUndeployException e) { throw new EPException("Failed to undeploy: " + e.getMessage(), e); } } stateManager.destroy(); }
/** * Destroy the adapter. */ public synchronized void destroy() { if (log.isDebugEnabled()) { log.debug("Destroying Esper HTTP Adapter"); } EPRuntimeSPI runtime = (EPRuntimeSPI) EPRuntimeProvider.getRuntime(runtimeURI); for (String deployment : deployments) { try { runtime.getDeploymentService().undeploy(deployment); } catch (EPUndeployException e) { throw new EPException("Failed to undeploy: " + e.getMessage(), e); } } for (EsperHttpServiceBase service : services.values()) { try { service.destroy(); } catch (Throwable t) { log.info("Error destroying service '" + service.getServiceName() + "' :" + t.getMessage()); } } services.clear(); }
/** * Destroy the adapter. */ public synchronized void destroy() { if (log.isDebugEnabled()) { log.debug("Destroying Esper DB Adapter"); } EPRuntimeSPI runtime = (EPRuntimeSPI) EPRuntimeProvider.getRuntime(runtimeURI); for (String deployment : deployments) { try { runtime.getDeploymentService().undeploy(deployment); } catch (EPUndeployException e) { throw new EPException("Failed to undeploy: " + e.getMessage(), e); } } executorFactory.destroy(); } }
public void destroy(String statementName) { log.info("Via Java Management JMX proxy: Destroying statement '" + statementName + "'"); for (String deploymentId : runtime.getDeploymentService().getDeployments()) { EPDeployment deployment = runtime.getDeploymentService().getDeployment(deploymentId); for (EPStatement stmt : deployment.getStatements()) { if (statementName.equals(stmt.getName())) { try { runtime.getDeploymentService().undeploy(deploymentId); } catch (EPUndeployException e) { log.warn("Failed to undeploy: " + e.getMessage()); } } } } }
public void run(RegressionEnvironment env) { try { env.deployment().undeploy("nofound"); fail(); } catch (EPUndeployNotFoundException ex) { SupportMessageAssertUtil.assertMessage(ex.getMessage(), "Deployment id 'nofound' cannot be found"); } catch (EPUndeployException t) { fail(); } } }
private static void tryInvalidUndeploy(RegressionEnvironment env, String statementName, String message) { try { env.runtime().getDeploymentService().undeploy(env.statement(statementName).getDeploymentId()); fail(); } catch (EPUndeployPreconditionException ex) { if (!message.equals("skip")) { SupportMessageAssertUtil.assertMessage(ex.getMessage(), message); } } catch (EPUndeployException ex) { fail(); } } }
public RegressionEnvironment undeployModuleContaining(String statementName) { String[] deployments = runtime.getDeploymentService().getDeployments(); try { for (String deployment : deployments) { EPDeployment info = runtime.getDeploymentService().getDeployment(deployment); for (EPStatement stmt : info.getStatements()) { if (stmt.getName().equals(statementName)) { runtime.getDeploymentService().undeploy(deployment); return this; } } } } catch (EPUndeployException ex) { throw notExpected(ex); } fail("Failed to find deployment with statement '" + statementName + "'"); return this; }
runtime.getDeploymentService().undeploy(stmts[j].getDeploymentId()); } catch (EPUndeployException e) { throw new RuntimeException(e);
public void update(EventBean[] newEvents, EventBean[] oldEvents, EPStatement statement, EPRuntime runtime) { isCalled = true; try { // create statement for thread - this can be called multiple times as other threads send SupportBean EPDeployment deployment; try { deployment = env.runtime().getDeploymentService().deploy(compiled); } catch (EPDeployException e) { throw new RuntimeException(e); } SupportMTUpdateListener listener = new SupportMTUpdateListener(); deployment.getStatements()[0].addListener(listener); Object theEvent = new SupportMarketDataBean("", 0, (long) numThread, null); env.sendEventBean(theEvent, theEvent.getClass().getSimpleName()); env.runtime().getDeploymentService().undeploy(deployment.getDeploymentId()); EventBean[] eventsReceived = listener.getNewDataListFlattened(); boolean found = false; for (int i = 0; i < eventsReceived.length; i++) { if (eventsReceived[i].getUnderlying() == theEvent) { found = true; } } Assert.assertTrue(found); } catch (Throwable t) { lastException = t; } }
runtime.getDeploymentService().undeploy(deployed.getDeploymentId()); theEvent = makeEvent(); ThreadLogUtil.trace("send non-matching event ", theEvent);
env.deployment().undeploy(env.deploymentId("ctx")); fail(); } catch (EPUndeployException ex) {
env.deployment().undeploy(env.deploymentId("S0")); fail(); } catch (EPUndeployException ex) {