public void shutdown() { if (connectionFactory != null) { connectionFactory.shutdown(); connectionFactory = null; } if (hazelcast != null) { hazelcast.getLifecycleService().shutdown(); hazelcast = null; } }