當前位置: 首頁>>代碼示例>>Java>>正文


Java Member.getUuid方法代碼示例

本文整理匯總了Java中com.hazelcast.core.Member.getUuid方法的典型用法代碼示例。如果您正苦於以下問題:Java Member.getUuid方法的具體用法?Java Member.getUuid怎麽用?Java Member.getUuid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.hazelcast.core.Member的用法示例。


在下文中一共展示了Member.getUuid方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: notifyAdmins

import com.hazelcast.core.Member; //導入方法依賴的package包/類
private static void notifyAdmins(HazelcastInstance sysInstance, Member local, String schemaName, boolean initialized) {

    	int cnt = 0;
		IExecutorService execService = sysInstance.getExecutorService(PN_XDM_SYSTEM_POOL);
        Set<Member> admins = getAdmins(sysInstance);

		// notify admin about new schema node (local)
		// hzInstance -> system instance, SchemaManagement is in its context
		// submit task to init member in admin..
		SchemaAdministrator adminTask = new SchemaAdministrator(schemaName, !initialized, local.getUuid());
       	Map<Member, Future<Boolean>> result = execService.submitToMembers(adminTask, admins);
        
        for (Map.Entry<Member, Future<Boolean>> e: result.entrySet()) {
   	       	try {
   				if (e.getValue().get()) {
   					cnt++;
   				} else {
   					logger.info("notifyAdmins; failed admin notification on member {}", e.getKey()); 
   				}
   			} catch (InterruptedException | ExecutionException ex) {
   				logger.error("notifyAdmins.error; ", ex);
   	        }
    	}
		logger.debug("notifyAdmins; notified {} admin nodes out of {} admins", cnt, admins.size());
    }
 
開發者ID:dsukhoroslov,項目名稱:bagri,代碼行數:26,代碼來源:BagriCacheServer.java

示例2: getNodeIds

import com.hazelcast.core.Member; //導入方法依賴的package包/類
@ManagedAttribute(description="Returns active Node identifier")
public String[] getNodeIds() {
	Node node = getEntity();
	List<Member> members = getMembers(node.getName());
	if (members.size() > 0) {
		int i = 0;
		String[] ids = new String[members.size()];
		for (Member member: members) {
			ids[i++] = member.getUuid();
		}
		return ids;
	}
	return null;
}
 
開發者ID:dsukhoroslov,項目名稱:bagri,代碼行數:15,代碼來源:NodeManager.java

示例3: call

import com.hazelcast.core.Member; //導入方法依賴的package包/類
@Override
public String call() throws Exception {
   	logger.trace("call.enter; schema: {}", schemaName);
	HazelcastInstance hz = findSchemaInstance(schemaName);
   	Member member = hz.getCluster().getLocalMember();
	String result = member.getUuid();
   	logger.trace("call.exit; returning: {} for member: {}", result, member);
	return result;
}
 
開發者ID:dsukhoroslov,項目名稱:bagri,代碼行數:10,代碼來源:SchemaMemberExtractor.java

示例4: ClusterMemberImpl

import com.hazelcast.core.Member; //導入方法依賴的package包/類
ClusterMemberImpl(Member member) {
  this.uuid = member.getUuid() ;
  this.hostname = member.getSocketAddress().getHostName() ;
  this.ipAddress = member.getSocketAddress().getAddress().getHostAddress() ; 
  this.port = member.getSocketAddress().getPort() ;
  this.memberName = member.getStringAttribute("member-name") ;
}
 
開發者ID:DemandCube,項目名稱:NeverwinterDP-Commons,代碼行數:8,代碼來源:ClusterMemberImpl.java


注:本文中的com.hazelcast.core.Member.getUuid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。