当前位置: 首页>>代码示例>>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;未经允许,请勿转载。