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

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

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

Node.getSocketAddress介绍

[英]Returns the unique socking binding address of this node.
[中]返回此节点的唯一套接字绑定地址。

代码示例

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

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

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

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

相关文章