@Override public void shutdown() { getLifecycleService().shutdown(); }
@Override public void shutdown() { getLifecycleService().shutdown(); }
private static void shutdownAll(boolean terminate) { List<HazelcastInstanceProxy> instances = new LinkedList<HazelcastInstanceProxy>(); for (InstanceFuture future : INSTANCE_MAP.values()) { try { HazelcastInstanceProxy instanceProxy = future.get(); instances.add(instanceProxy); } catch (RuntimeException ignored) { ignore(ignored); } } INSTANCE_MAP.clear(); OutOfMemoryErrorDispatcher.clearServers(); ManagementService.shutdownAll(instances); Collections.sort(instances, new Comparator<HazelcastInstanceProxy>() { public int compare(HazelcastInstanceProxy o1, HazelcastInstanceProxy o2) { return o1.getName().compareTo(o2.getName()); } }); for (HazelcastInstanceProxy proxy : instances) { if (terminate) { proxy.getLifecycleService().terminate(); } else { proxy.getLifecycleService().shutdown(); } proxy.original = null; } }
private static void shutdownAll(boolean terminate) { List<HazelcastInstanceProxy> instances = new LinkedList<HazelcastInstanceProxy>(); for (InstanceFuture future : INSTANCE_MAP.values()) { try { HazelcastInstanceProxy instanceProxy = future.get(); instances.add(instanceProxy); } catch (RuntimeException ignored) { ignore(ignored); } } INSTANCE_MAP.clear(); OutOfMemoryErrorDispatcher.clearServers(); ManagementService.shutdownAll(instances); Collections.sort(instances, new Comparator<HazelcastInstanceProxy>() { public int compare(HazelcastInstanceProxy o1, HazelcastInstanceProxy o2) { return o1.getName().compareTo(o2.getName()); } }); for (HazelcastInstanceProxy proxy : instances) { if (terminate) { proxy.getLifecycleService().terminate(); } else { proxy.getLifecycleService().shutdown(); } proxy.original = null; } }