public static void shutdown(String instanceName) { HazelcastClientProxy proxy = INSTANCE.clients.remove(instanceName); if (proxy == null) { return; } HazelcastClientInstanceImpl client = proxy.client; if (client == null) { return; } proxy.client = null; try { client.shutdown(); } catch (Throwable ignored) { ignore(ignored); } finally { OutOfMemoryErrorDispatcher.deregisterClient(client); } }
/** * Shutdown the provided client and remove it from the managed list * * @param instanceName the hazelcast client instance name */ public static void shutdown(String instanceName) { HazelcastClientProxy proxy = CLIENTS.remove(instanceName); if (proxy == null) { return; } HazelcastClientInstanceImpl client = proxy.client; if (client == null) { return; } proxy.client = null; try { client.shutdown(); } catch (Throwable ignored) { EmptyStatement.ignore(ignored); } finally { OutOfMemoryErrorDispatcher.deregisterClient(client); } }
public static void shutdown(HazelcastInstance instance) { if (instance instanceof HazelcastClientProxy) { final HazelcastClientProxy proxy = (HazelcastClientProxy) instance; HazelcastClientInstanceImpl client = proxy.client; if (client == null) { return; } proxy.client = null; INSTANCE.clients.remove(client.getName()); try { client.shutdown(); } catch (Throwable ignored) { ignore(ignored); } finally { OutOfMemoryErrorDispatcher.deregisterClient(client); } } }
/** * Shutdown the provided client and remove it from the managed list * * @param instance the hazelcast client instance */ public static void shutdown(HazelcastInstance instance) { if (instance instanceof HazelcastClientProxy) { final HazelcastClientProxy proxy = (HazelcastClientProxy) instance; HazelcastClientInstanceImpl client = proxy.client; if (client == null) { return; } proxy.client = null; CLIENTS.remove(client.getName()); try { client.shutdown(); } catch (Throwable ignored) { EmptyStatement.ignore(ignored); } finally { OutOfMemoryErrorDispatcher.deregisterClient(client); } } }