org.wildfly.clustering.group.Node.getName()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(240)

本文整理了Java中org.wildfly.clustering.group.Node.getName()方法的一些代码示例,展示了Node.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getName()方法的具体详情如下:
包路径:org.wildfly.clustering.group.Node
类名称:Node
方法名:getName

Node.getName介绍

[英]Returns the logical name of this node.
[中]返回此节点的逻辑名称。

代码示例

代码示例来源:origin: wildfly/wildfly

  1. @Override
  2. public boolean preferred(Node node) {
  3. return node.getName().equals(this.name);
  4. }
  5. }

代码示例来源:origin: wildfly/wildfly

  1. @Override
  2. public String getId() {
  3. return this.getOwnAddress().getName();
  4. }

代码示例来源:origin: wildfly/wildfly

  1. @Override
  2. public <R> CompletionStage<R> executeOnMember(Command<R, ? super C> command, Node member) throws CommandDispatcherException {
  3. if (!this.node.equals(this.node)) {
  4. throw new IllegalArgumentException(member.getName());
  5. }
  6. try {
  7. R result = command.execute(this.context);
  8. return CompletableFuture.completedFuture(result);
  9. } catch (Exception e) {
  10. CompletableFuture<R> future = new CompletableFuture<>();
  11. future.completeExceptionally(e);
  12. return future;
  13. }
  14. }

代码示例来源:origin: wildfly/wildfly

  1. @Override
  2. public Map.Entry<String, List<ClientMapping>> get() {
  3. return new AbstractMap.SimpleImmutableEntry<>(this.group.get().getLocalMember().getName(), this.getClientMappings());
  4. }

代码示例来源:origin: wildfly/wildfly

  1. ClusteringServerLogger.ROOT_LOGGER.elected(elected.getName(), this.name.getCanonicalName());

代码示例来源:origin: org.wildfly/wildfly-clustering-singleton-api

  1. @Override
  2. public boolean preferred(Node node) {
  3. return node.getName().equals(this.name);
  4. }
  5. }

代码示例来源:origin: org.jboss.eap/wildfly-connector

  1. @Override
  2. public String getId() {
  3. return this.getOwnAddress().getName();
  4. }

代码示例来源:origin: org.jboss.eap/wildfly-clustering-server

  1. @Override
  2. public <R> CompletionStage<R> executeOnMember(Command<R, ? super C> command, Node member) throws CommandDispatcherException {
  3. if (!this.node.equals(this.node)) {
  4. throw new IllegalArgumentException(member.getName());
  5. }
  6. try {
  7. R result = command.execute(this.context);
  8. return CompletableFuture.completedFuture(result);
  9. } catch (Exception e) {
  10. CompletableFuture<R> future = new CompletableFuture<>();
  11. future.completeExceptionally(e);
  12. return future;
  13. }
  14. }

代码示例来源:origin: io.thorntail/topology-jgroups

  1. String sourceKey(Node node) {
  2. return node.getName() + ":" + node.getSocketAddress().toString();
  3. }

代码示例来源:origin: wildfly-swarm-archive/ARCHIVE-wildfly-swarm

  1. String sourceKey(Node node) {
  2. return node.getName() + ":" + node.getSocketAddress().toString();
  3. }

代码示例来源:origin: org.jboss.eap/wildfly-clustering-server

  1. ClusteringServerLogger.ROOT_LOGGER.elected(elected.getName(), this.name.getCanonicalName());

相关文章