コード例 #1
0
 void shutdown() {
   final Collection<NodeEngineImpl> values = new ArrayList<NodeEngineImpl>(nodes.values());
   nodes.clear();
   for (NodeEngineImpl value : values) {
     value.getHazelcastInstance().getLifecycleService().shutdown();
   }
 }
コード例 #2
0
 void terminate() {
   final Collection<NodeEngineImpl> values = new ArrayList<NodeEngineImpl>(nodes.values());
   nodes.clear();
   for (NodeEngineImpl value : values) {
     HazelcastInstance hz = value.getHazelcastInstance();
     hz.getLifecycleService().terminate();
   }
 }
コード例 #3
0
 Collection<HazelcastInstance> getAllHazelcastInstances() {
   Collection<HazelcastInstance> all = new LinkedList<HazelcastInstance>();
   for (NodeEngineImpl nodeEngine : nodes.values()) {
     if (nodeEngine.isActive()) {
       all.add(nodeEngine.getHazelcastInstance());
     }
   }
   return all;
 }
コード例 #4
0
 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());
 }
コード例 #5
0
 HazelcastInstance getInstance(Address address) {
   NodeEngineImpl nodeEngine = nodes.get(address);
   return nodeEngine != null && nodeEngine.isActive() ? nodeEngine.getHazelcastInstance() : null;
 }