/** * Destroys any {@link #ensureHazelcastInstance() implicitly created} backing {@code HazelcastInstance}. If the * backing Hazelcast was not implicitly created (i.e. because it was configured externally and supplied via * {@link #setHazelcastInstance(com.hazelcast.core.HazelcastInstance) setHazelcastInstance}), this method does * nothing. * * @throws Exception if there is a problem shutting down */ public void destroy() throws Exception { if (this.implicitlyCreated) { try { this.hazelcastInstance.getLifecycleService().shutdown(); } catch (Throwable t) { if (log.isWarnEnabled()) { log.warn("Unable to cleanly shutdown implicitly created HazelcastInstance. " + "Ignoring (shutting down)...", t); } } finally { this.hazelcastInstance = null; this.implicitlyCreated = false; } } }
public void destroy() { if (hazelcastInstance != null) { hazelcastInstance.getLifecycleService().shutdown(); } }
void stop() { try { running = false; es.shutdown(); es.awaitTermination(10, TimeUnit.SECONDS); esStats.shutdown(); hazelcast.getLifecycleService().shutdown(); } catch (Throwable t) { t.printStackTrace(); } }
public void destroy() { if (hazelcastInstance != null) { hazelcastInstance.getLifecycleService().shutdown(); } }
@Override protected void doStop() throws Exception { //noop if (useLocalHzInstance) { hzInstance.getLifecycleService().shutdown(); } }
public void destroy() { if (instance != null) { instance.getLifecycleService().shutdown(); } }
@Override public void destroy() throws Exception { if (hz != null) { LOGGER.info("HzCluster.destroy() invoked, shutting down Hazelcast instance..."); CLUSTER = null; hz.getLifecycleService().shutdown(); hz = null; LOGGER.info("HzCluster.destroy(): Hazelcast instance shut down complete"); } }
@Override public void stop() { HazelcastInstance instance = hazelcastInstance; if (instance != null) { instance.getLifecycleService().shutdown(); } }
@Override public void shutdown() { getLifecycleService().shutdown(); }
@Override public void passivateService() throws Exception { stringMap = null; hazelcastInstance.getLifecycleService().shutdown(); }
@Override public void dispose() { if (clusterInstance != null) { // KG-5837: do not call Hazelcast.shutdownAll() since that will hobble all in-process gateways clusterInstance.getLifecycleService().shutdown(); } }
@Override public void doStop() throws Exception { for (HazelcastInstance hazelcastInstance : customHazelcastInstances) { hazelcastInstance.getLifecycleService().shutdown(); } customHazelcastInstances.clear(); super.doStop(); }
@Override public void run() { try { clientContext.getLifecycleService().shutdown(); } catch (Exception exception) { logger.severe("Exception during client shutdown ", exception); } } }, clientContext.getName() + ".clientShutdown-").start();
private static void fillHazelcastMapWithUsers() { Random random = new Random(); HazelcastInstance client = HazelcastClient.newHazelcastClient(); IMap<String, User> users = client.getMap("users"); for (int i = 0; i < 10; i++) { String name = "user-" + i; User user = new User(name, random.nextInt(80), random.nextInt(10000)); users.put(name, user); } client.getLifecycleService().shutdown(); } }
@Override public void run() { try { clientContext.getLifecycleService().shutdown(); } catch (Exception exception) { logger.severe("Exception during client shutdown ", exception); } } }, clientContext.getName() + ".clientShutdown-").start();
public void shutdown() { if (hazelcast != null) { mqInstance.shutdown(); hazelcast.getLifecycleService().shutdown(); hazelcast = null; } } }
public void shutdown() { if (hazelcast != null) { mqInstance.shutdown(); hazelcast.getLifecycleService().shutdown(); hazelcast = null; } } }
@Override public void stop() { if (instance != null && instance.getLifecycleService().isRunning()) { instance.getLifecycleService().shutdown(); } }
@Override public void shutdown() { if(h != null) { h.shutdown(); h.getLifecycleService().shutdown(); } if(resource != null) resource.shutdown(); }
@Override public void stop() { if (instance != null && instance.getLifecycleService().isRunning()) { instance.getLifecycleService().shutdown(); } }