本文整理汇总了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());
}
示例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;
}
示例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;
}
示例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") ;
}