org.wildfly.clustering.group.Node类的使用及代码示例

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

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

Node介绍

[英]Identifies a member of a cluster.
[中]标识群集的成员。

代码示例

代码示例来源: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 boolean preferred(Node node) {
  3. return node.getSocketAddress().getAddress().getHostAddress().equals(this.address.getAddress().getHostAddress()) && (node.getSocketAddress().getPort() == this.address.getPort());
  4. }
  5. }

代码示例来源: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: wildfly/wildfly

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

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

  1. @Override
  2. public boolean preferred(Node node) {
  3. OutboundSocketBinding binding = this.binding.get();
  4. try {
  5. return binding.getResolvedDestinationAddress().equals(node.getSocketAddress().getAddress()) && (binding.getDestinationPort() == node.getSocketAddress().getPort());
  6. } catch (UnknownHostException e) {
  7. throw new IllegalArgumentException(e);
  8. }
  9. }
  10. }

代码示例来源: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: org.wildfly/wildfly-clustering-singleton-api

  1. @Override
  2. public boolean preferred(Node node) {
  3. return node.getSocketAddress().getAddress().getHostAddress().equals(this.address.getAddress().getHostAddress()) && (node.getSocketAddress().getPort() == this.address.getPort());
  4. }
  5. }

代码示例来源: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: org.jboss.eap/wildfly-clustering-singleton-extension

  1. @Override
  2. public boolean preferred(Node node) {
  3. OutboundSocketBinding binding = this.binding.get();
  4. try {
  5. return binding.getResolvedDestinationAddress().equals(node.getSocketAddress().getAddress()) && (binding.getDestinationPort() == node.getSocketAddress().getPort());
  6. } catch (UnknownHostException e) {
  7. throw new IllegalArgumentException(e);
  8. }
  9. }
  10. }

代码示例来源: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: org.jboss.eap/wildfly-clustering-server

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

相关文章