/** * Stops the streamer. * * @throws IgniteException In cases if failed to stop the streamer. */ public void stop() throws IgniteException { // If the Camel Context is stopping or stopped, reject this call to stop. if (camelCtx.getStatus() == ServiceStatus.Stopped || camelCtx.getStatus() == ServiceStatus.Stopping) throw new IgniteException("Failed to stop Camel streamer (CamelContext already stopped or stopping)."); // Stop Camel services. try { ServiceHelper.stopAndShutdownServices(camelCtx, endpoint, consumer); } catch (Exception e) { throw new IgniteException("Failed to stop Camel streamer [errMsg=" + e.getMessage() + ']'); } U.log(log, "Stopped Camel streamer, formerly consuming from endpoint URI: " + endpointUri); }
ServiceHelper.stopAndShutdownServices(camelCtx, endpoint, consumer);
@Override protected void doShutdown() throws Exception { ServiceHelper.stopAndShutdownServices(processor); } }
@Override protected void doShutdown() throws Exception { ServiceHelper.stopAndShutdownServices(processor); } }
@Override protected void doShutdown() throws Exception { ServiceHelper.stopAndShutdownServices(output); }
private synchronized void onLeadershipLost() throws Exception { ServiceHelper.stopAndShutdownServices(delegatedConsumer); ServiceHelper.stopAndShutdownServices(delegatedEndpoint); delegatedConsumer = null; LOGGER.info("Leadership lost: consumer stopped: {}", delegatedEndpoint); }
private void stopConsumer() throws Exception { ServiceHelper.stopAndShutdownServices(delegate); ServiceHelper.stopAndShutdownServices(endpoint.getConsumerEndpoint()); delegate = null; delegateService = null; thisNodeState = null; }
@Override protected void doStop() throws Exception { super.doStop(); ServiceHelper.stopAndShutdownServices(zookeeperGroupSupport); }
@Override protected void doStop() throws Exception { super.doStop(); ServiceHelper.stopAndShutdownServices(groupListener); masterConsumer.set(false); }
@Override protected void doStop() throws Exception { super.doStop(); if (view != null) { view.removeEventListener(leadershipListener); clusterService.releaseView(view); view = null; } ServiceHelper.stopAndShutdownServices(delegatedConsumer); ServiceHelper.stopAndShutdownServices(delegatedEndpoint); delegatedConsumer = null; }
@Override protected void doStop() throws Exception { super.doStop(); final ServiceEndpoint endpoint = (ServiceEndpoint)getEndpoint(); final ServiceDefinition definition = endpoint.getServiceDefinition(); // de-register service serviceRegistry.deregister(definition); // stop delegate ServiceHelper.stopAndShutdownServices(delegatedConsumer); ServiceHelper.stopAndShutdownServices(delegatedEndpoint); delegatedConsumer = null; }
@Override protected void doStop() throws Exception { try { stopConsumer(); } finally { ServiceHelper.stopAndShutdownServices(groupListener); } super.doStop(); }