本文整理了Java中org.wildfly.clustering.group.Node
类的一些代码示例,展示了Node
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node
类的具体详情如下:
包路径:org.wildfly.clustering.group.Node
类名称:Node
[英]Identifies a member of a cluster.
[中]标识群集的成员。
代码示例来源:origin: wildfly/wildfly
@Override
public boolean preferred(Node node) {
return node.getName().equals(this.name);
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public boolean preferred(Node node) {
return node.getSocketAddress().getAddress().getHostAddress().equals(this.address.getAddress().getHostAddress()) && (node.getSocketAddress().getPort() == this.address.getPort());
}
}
代码示例来源:origin: io.thorntail/topology-jgroups
String sourceKey(Node node) {
return node.getName() + ":" + node.getSocketAddress().toString();
}
代码示例来源:origin: wildfly-swarm-archive/ARCHIVE-wildfly-swarm
String sourceKey(Node node) {
return node.getName() + ":" + node.getSocketAddress().toString();
}
代码示例来源:origin: wildfly/wildfly
@Override
public String getId() {
return this.getOwnAddress().getName();
}
代码示例来源:origin: wildfly/wildfly
@Override
public boolean preferred(Node node) {
OutboundSocketBinding binding = this.binding.get();
try {
return binding.getResolvedDestinationAddress().equals(node.getSocketAddress().getAddress()) && (binding.getDestinationPort() == node.getSocketAddress().getPort());
} catch (UnknownHostException e) {
throw new IllegalArgumentException(e);
}
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public <R> CompletionStage<R> executeOnMember(Command<R, ? super C> command, Node member) throws CommandDispatcherException {
if (!this.node.equals(this.node)) {
throw new IllegalArgumentException(member.getName());
}
try {
R result = command.execute(this.context);
return CompletableFuture.completedFuture(result);
} catch (Exception e) {
CompletableFuture<R> future = new CompletableFuture<>();
future.completeExceptionally(e);
return future;
}
}
代码示例来源:origin: org.wildfly/wildfly-clustering-singleton-api
@Override
public boolean preferred(Node node) {
return node.getSocketAddress().getAddress().getHostAddress().equals(this.address.getAddress().getHostAddress()) && (node.getSocketAddress().getPort() == this.address.getPort());
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public Map.Entry<String, List<ClientMapping>> get() {
return new AbstractMap.SimpleImmutableEntry<>(this.group.get().getLocalMember().getName(), this.getClientMappings());
}
代码示例来源:origin: org.jboss.eap/wildfly-clustering-singleton-extension
@Override
public boolean preferred(Node node) {
OutboundSocketBinding binding = this.binding.get();
try {
return binding.getResolvedDestinationAddress().equals(node.getSocketAddress().getAddress()) && (binding.getDestinationPort() == node.getSocketAddress().getPort());
} catch (UnknownHostException e) {
throw new IllegalArgumentException(e);
}
}
}
代码示例来源:origin: wildfly/wildfly
ClusteringServerLogger.ROOT_LOGGER.elected(elected.getName(), this.name.getCanonicalName());
代码示例来源:origin: org.wildfly/wildfly-clustering-singleton-api
@Override
public boolean preferred(Node node) {
return node.getName().equals(this.name);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-connector
@Override
public String getId() {
return this.getOwnAddress().getName();
}
代码示例来源:origin: org.jboss.eap/wildfly-clustering-server
@Override
public <R> CompletionStage<R> executeOnMember(Command<R, ? super C> command, Node member) throws CommandDispatcherException {
if (!this.node.equals(this.node)) {
throw new IllegalArgumentException(member.getName());
}
try {
R result = command.execute(this.context);
return CompletableFuture.completedFuture(result);
} catch (Exception e) {
CompletableFuture<R> future = new CompletableFuture<>();
future.completeExceptionally(e);
return future;
}
}
代码示例来源:origin: org.jboss.eap/wildfly-clustering-server
ClusteringServerLogger.ROOT_LOGGER.elected(elected.getName(), this.name.getCanonicalName());
内容来源于网络,如有侵权,请联系作者删除!