void shutdown() { final Collection<NodeEngineImpl> values = new ArrayList<NodeEngineImpl>(nodes.values()); nodes.clear(); for (NodeEngineImpl value : values) { value.getHazelcastInstance().getLifecycleService().shutdown(); } }
void terminate() { final Collection<NodeEngineImpl> values = new ArrayList<NodeEngineImpl>(nodes.values()); nodes.clear(); for (NodeEngineImpl value : values) { HazelcastInstance hz = value.getHazelcastInstance(); hz.getLifecycleService().terminate(); } }
Collection<HazelcastInstance> getAllHazelcastInstances() { Collection<HazelcastInstance> all = new LinkedList<HazelcastInstance>(); for (NodeEngineImpl nodeEngine : nodes.values()) { if (nodeEngine.isActive()) { all.add(nodeEngine.getHazelcastInstance()); } } return all; }
private MemberImpl createMember(MemberInfo memberInfo, String ipV6ScopeId) { Address address = memberInfo.getAddress(); address.setScopeId(ipV6ScopeId); return new MemberImpl( address, thisAddress.equals(address), memberInfo.getUuid(), (HazelcastInstanceImpl) nodeEngine.getHazelcastInstance(), memberInfo.getAttributes(), memberInfo.isLiteMember()); }
HazelcastInstance getInstance(Address address) { NodeEngineImpl nodeEngine = nodes.get(address); return nodeEngine != null && nodeEngine.isActive() ? nodeEngine.getHazelcastInstance() : null; }