本文整理匯總了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") ;
}