本文整理了Java中io.atomix.catalyst.transport.Address.equals()
方法的一些代码示例,展示了Address.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.equals()
方法的具体详情如下:
包路径:io.atomix.catalyst.transport.Address
类名称:Address
方法名:equals
暂无
代码示例来源:origin: atomix/copycat
@Override
public boolean equals(Object object) {
if (object instanceof ConnectResponse) {
ConnectResponse response = (ConnectResponse) object;
return response.status == status
&& ((response.leader == null && leader == null)
|| (response.leader != null && leader != null && response.leader.equals(leader)))
&& ((response.members == null && members == null)
|| (response.members != null && members != null && response.members.equals(members)));
}
return false;
}
代码示例来源:origin: atomix/copycat
@Override
public boolean equals(Object object) {
if (object instanceof KeepAliveResponse) {
KeepAliveResponse response = (KeepAliveResponse) object;
return response.status == status
&& ((response.leader == null && leader == null)
|| (response.leader != null && leader != null && response.leader.equals(leader)))
&& ((response.members == null && members == null)
|| (response.members != null && members != null && response.members.equals(members)));
}
return false;
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
@Override
public boolean equals(Object object) {
if (object instanceof ConnectResponse) {
ConnectResponse response = (ConnectResponse) object;
return response.status == status
&& ((response.leader == null && leader == null)
|| (response.leader != null && leader != null && response.leader.equals(leader)))
&& ((response.members == null && members == null)
|| (response.members != null && members != null && response.members.equals(members)));
}
return false;
}
代码示例来源:origin: io.atomix.copycat/copycat-protocol
@Override
public boolean equals(Object object) {
if (object instanceof KeepAliveResponse) {
KeepAliveResponse response = (KeepAliveResponse) object;
return response.status == status
&& ((response.leader == null && leader == null)
|| (response.leader != null && leader != null && response.leader.equals(leader)))
&& ((response.members == null && members == null)
|| (response.members != null && members != null && response.members.equals(members)));
}
return false;
}
代码示例来源:origin: io.atomix.copycat/copycat-protocol
@Override
public boolean equals(Object object) {
if (object instanceof ConnectResponse) {
ConnectResponse response = (ConnectResponse) object;
return response.status == status
&& ((response.leader == null && leader == null)
|| (response.leader != null && leader != null && response.leader.equals(leader)))
&& ((response.members == null && members == null)
|| (response.members != null && members != null && response.members.equals(members)));
}
return false;
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
@Override
public boolean equals(Object object) {
if (object instanceof KeepAliveResponse) {
KeepAliveResponse response = (KeepAliveResponse) object;
return response.status == status
&& ((response.leader == null && leader == null)
|| (response.leader != null && leader != null && response.leader.equals(leader)))
&& ((response.members == null && members == null)
|| (response.members != null && members != null && response.members.equals(members)));
}
return false;
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
@Override
public boolean equals(Object object) {
if (object instanceof AcceptRequest) {
AcceptRequest request = (AcceptRequest) object;
return request.client.equals(client) && request.address.equals(address);
}
return false;
}
代码示例来源:origin: atomix/copycat
@Override
public boolean equals(Object object) {
if (object instanceof RegisterResponse) {
RegisterResponse response = (RegisterResponse) object;
return response.status == status
&& response.session == session
&& ((response.leader == null && leader == null)
|| (response.leader != null && leader != null && response.leader.equals(leader)))
&& ((response.members == null && members == null)
|| (response.members != null && members != null && response.members.equals(members)))
&& response.timeout == timeout;
}
return false;
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
@Override
public List<Address> selectConnections(Address leader, List<Address> servers) {
List<Address> addresses = new ArrayList<>(servers.size());
addresses.add(address);
Collections.shuffle(servers);
for (Address address : servers) {
if (!address.equals(this.address)) {
addresses.add(address);
}
}
return addresses;
}
}
代码示例来源:origin: atomix/copycat
@Override
public boolean equals(Object object) {
return object instanceof ServerMember && ((ServerMember) object).serverAddress().equals(serverAddress);
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
@Override
public boolean equals(Object object) {
return object instanceof ServerMember && ((ServerMember) object).serverAddress().equals(serverAddress);
}
代码示例来源:origin: io.atomix.copycat/copycat-server
@Override
public boolean equals(Object object) {
return object instanceof ServerMember && ((ServerMember) object).serverAddress().equals(serverAddress);
}
代码示例来源:origin: atomix/copycat
@Override
public Member member(Address address) {
if (member.address().equals(address)) {
return member;
}
MemberState member = addressMap.get(address);
return member != null ? member.getMember() : null;
}
代码示例来源:origin: io.atomix.copycat/copycat-server
@Override
public Member member(Address address) {
if (member.address().equals(address)) {
return member;
}
MemberState member = addressMap.get(address);
return member != null ? member.getMember() : null;
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
@Override
public Member member(Address address) {
if (member.address().equals(address)) {
return member;
}
MemberState member = addressMap.get(address);
return member != null ? member.getMember() : null;
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
@Override
public CompletableFuture<Connection> connect(Address address) {
if (this.address.equals(address)) {
return local.connect(address);
}
return remote.connect(address);
}
代码示例来源:origin: atomix/copycat
@Override
public boolean equals(Object object) {
if (object instanceof Member) {
Member member = (Member) object;
return member.type() == type() && member.serverAddress().equals(serverAddress());
}
return false;
}
}
代码示例来源:origin: atomix/copycat
protected CopycatServer(String name, Transport clientTransport, Transport serverTransport, ServerContext context) {
this.name = Assert.notNull(name, "name");
this.clientTransport = Assert.notNull(clientTransport, "clientTransport");
this.serverTransport = Assert.notNull(serverTransport, "serverTransport");
this.internalServer = serverTransport.server();
this.clientServer = !context.getCluster().member().serverAddress().equals(context.getCluster().member().clientAddress()) ? clientTransport.server() : null;
this.context = Assert.notNull(context, "context");
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
private CopycatServer(String name, Transport clientTransport, Transport serverTransport, ServerContext context) {
this.name = Assert.notNull(name, "name");
this.clientTransport = Assert.notNull(clientTransport, "clientTransport");
this.serverTransport = Assert.notNull(serverTransport, "serverTransport");
this.internalServer = serverTransport.server();
this.clientServer = !context.getCluster().member().serverAddress().equals(context.getCluster().member().clientAddress()) ? clientTransport.server() : null;
this.context = Assert.notNull(context, "context");
}
代码示例来源:origin: io.atomix.copycat/copycat-server
protected CopycatServer(String name, Transport clientTransport, Transport serverTransport, ServerContext context) {
this.name = Assert.notNull(name, "name");
this.clientTransport = Assert.notNull(clientTransport, "clientTransport");
this.serverTransport = Assert.notNull(serverTransport, "serverTransport");
this.internalServer = serverTransport.server();
this.clientServer = !context.getCluster().member().serverAddress().equals(context.getCluster().member().clientAddress()) ? clientTransport.server() : null;
this.context = Assert.notNull(context, "context");
}
内容来源于网络,如有侵权,请联系作者删除!